mirror of
				https://github.com/ae-utbm/sith.git
				synced 2025-11-04 11:03:04 +00:00 
			
		
		
		
	black
This commit is contained in:
		@@ -76,11 +76,21 @@ class CounterTest(TestCase):
 | 
			
		||||
            },
 | 
			
		||||
        )
 | 
			
		||||
        self.client.post(counter_url, "action=code&code=BARB", content_type="text/xml")
 | 
			
		||||
        self.client.post(counter_url, "action=add_product&product_id=4", content_type="text/xml")
 | 
			
		||||
        self.client.post(counter_url, "action=del_product&product_id=4", content_type="text/xml")
 | 
			
		||||
        self.client.post(counter_url, "action=code&code=2xdeco", content_type="text/xml")
 | 
			
		||||
        self.client.post(counter_url, "action=code&code=1xbarb", content_type="text/xml")
 | 
			
		||||
        response = self.client.post(counter_url, "action=code&code=fin", content_type="text/xml")
 | 
			
		||||
        self.client.post(
 | 
			
		||||
            counter_url, "action=add_product&product_id=4", content_type="text/xml"
 | 
			
		||||
        )
 | 
			
		||||
        self.client.post(
 | 
			
		||||
            counter_url, "action=del_product&product_id=4", content_type="text/xml"
 | 
			
		||||
        )
 | 
			
		||||
        self.client.post(
 | 
			
		||||
            counter_url, "action=code&code=2xdeco", content_type="text/xml"
 | 
			
		||||
        )
 | 
			
		||||
        self.client.post(
 | 
			
		||||
            counter_url, "action=code&code=1xbarb", content_type="text/xml"
 | 
			
		||||
        )
 | 
			
		||||
        response = self.client.post(
 | 
			
		||||
            counter_url, "action=code&code=fin", content_type="text/xml"
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        response_get = self.client.get(response.get("location"))
 | 
			
		||||
        response_content = response_get.content.decode("utf-8")
 | 
			
		||||
 
 | 
			
		||||
@@ -484,7 +484,6 @@ class CounterClick(CounterTabsMixin, CanViewMixin, DetailView):
 | 
			
		||||
        # by a proper separation between the api endpoints of the counter
 | 
			
		||||
        return len(request.POST) == 0 and len(request.body) != 0
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    def add_product(self, request, q=1, p=None):
 | 
			
		||||
        """
 | 
			
		||||
        Add a product to the basket
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user