From 1884b11c8e17635ac3df2678302ce49b5b16fc81 Mon Sep 17 00:00:00 2001 From: Diana Boiangiu Date: Tue, 23 Oct 2018 11:12:15 +0300 Subject: [PATCH] Fix product tests --- insitu/templates/_layout.html | 2 +- insitu/tests/test_product.py | 2 +- insitu/views/product.py | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/insitu/templates/_layout.html b/insitu/templates/_layout.html index fd1906cf..7ca24ee8 100644 --- a/insitu/templates/_layout.html +++ b/insitu/templates/_layout.html @@ -13,7 +13,7 @@ {% block head %} {% endblock %} - + {% block title %} diff --git a/insitu/tests/test_product.py b/insitu/tests/test_product.py index 1e3521fd..c4decb96 100644 --- a/insitu/tests/test_product.py +++ b/insitu/tests/test_product.py @@ -40,7 +40,7 @@ def setUp(self): def test_create_product_fields_required(self): data = {} - resp = self.client.post(reverse('product:add'), data) + resp = self.client.post(reverse('product:add'), data, follow=True) self.check_required_errors(resp, self.errors) def test_get_create_product(self): diff --git a/insitu/views/product.py b/insitu/views/product.py index e9398c0c..4fdc7153 100644 --- a/insitu/views/product.py +++ b/insitu/views/product.py @@ -19,7 +19,9 @@ ProtectedView, ProtectedTemplateView, ProtectedDetailView, ProtectedUpdateView, ProtectedCreateView, - ProtectedDeleteView) + ProtectedDeleteView, + LoggingProtectedCreateView, + ) from insitu.views.protected.permissions import ( IsAuthenticated, IsSuperuser,