From 5da2c4913d25aa1fb232f23781668730eb3e2e5d Mon Sep 17 00:00:00 2001 From: Thomas Girod Date: Tue, 10 Jan 2023 16:21:43 +0100 Subject: [PATCH] black --- counter/tests.py | 20 +++++++++++++++----- counter/views.py | 1 - 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/counter/tests.py b/counter/tests.py index 8e0c7750..af2403e5 100644 --- a/counter/tests.py +++ b/counter/tests.py @@ -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") diff --git a/counter/views.py b/counter/views.py index 2416ce78..c195ae36 100644 --- a/counter/views.py +++ b/counter/views.py @@ -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