mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-07 02:25:18 +00:00
black
This commit is contained in:
parent
e5abba89bd
commit
5da2c4913d
@ -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=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(
|
||||||
self.client.post(counter_url, "action=del_product&product_id=4", content_type="text/xml")
|
counter_url, "action=add_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")
|
self.client.post(
|
||||||
response = self.client.post(counter_url, "action=code&code=fin", content_type="text/xml")
|
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_get = self.client.get(response.get("location"))
|
||||||
response_content = response_get.content.decode("utf-8")
|
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
|
# by a proper separation between the api endpoints of the counter
|
||||||
return len(request.POST) == 0 and len(request.body) != 0
|
return len(request.POST) == 0 and len(request.body) != 0
|
||||||
|
|
||||||
|
|
||||||
def add_product(self, request, q=1, p=None):
|
def add_product(self, request, q=1, p=None):
|
||||||
"""
|
"""
|
||||||
Add a product to the basket
|
Add a product to the basket
|
||||||
|
Loading…
x
Reference in New Issue
Block a user