From 26270550772de9dc68439a2b9370c9ba9c0e0151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Tue, 23 Jul 2019 21:15:19 +0200 Subject: [PATCH] Fix tests. --- src/shop/tests.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/shop/tests.py b/src/shop/tests.py index 38607056..9efa0070 100644 --- a/src/shop/tests.py +++ b/src/shop/tests.py @@ -154,9 +154,7 @@ class TestProductDetailView(TestCase): order = self.user.orders.get() - self.assertRedirects( - response, reverse("shop:order_detail", kwargs={"pk": order.pk}) - ) + self.assertRedirects(response, reverse("shop:index")) def test_product_is_in_order(self): # Put the product in an order owned by the user @@ -182,9 +180,7 @@ class TestProductDetailView(TestCase): response = self.client.post(self.path, data={"quantity": 2}) - self.assertRedirects( - response, reverse("shop:order_detail", kwargs={"pk": opr.order.pk}) - ) + self.assertRedirects(response, reverse("shop:index")) opr.refresh_from_db() self.assertEquals(opr.quantity, 2)