From 6b00452830d7b52a929d715903bb5c3448999935 Mon Sep 17 00:00:00 2001 From: reverend Date: Sun, 13 Sep 2020 12:39:46 +0200 Subject: [PATCH] Refactoring --- lostplaces/lostplaces_app/tests/views/__init__.py | 2 +- lostplaces/lostplaces_app/tests/views/test_place_views.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lostplaces/lostplaces_app/tests/views/__init__.py b/lostplaces/lostplaces_app/tests/views/__init__.py index f958b96..22455bf 100644 --- a/lostplaces/lostplaces_app/tests/views/__init__.py +++ b/lostplaces/lostplaces_app/tests/views/__init__.py @@ -1,6 +1,6 @@ from django.test import Client -class ViewTestCase: +class ViewTestCaseMixin: view = None def setUp(self): diff --git a/lostplaces/lostplaces_app/tests/views/test_place_views.py b/lostplaces/lostplaces_app/tests/views/test_place_views.py index 387285c..5b5c2a4 100644 --- a/lostplaces/lostplaces_app/tests/views/test_place_views.py +++ b/lostplaces/lostplaces_app/tests/views/test_place_views.py @@ -10,9 +10,9 @@ from lostplaces_app.views import ( PlaceListView ) from lostplaces_app.forms import PlaceImageCreateForm, PlaceForm -from lostplaces_app.tests.views import ViewTestCase +from lostplaces_app.tests.views import ViewTestCaseMixin -class TestPlaceCreateView(ViewTestCase, TestCase): +class TestPlaceCreateView(ViewTestCaseMixin, TestCase): view = PlaceCreateView @@ -42,7 +42,7 @@ class TestPlaceCreateView(ViewTestCase, TestCase): self.assertHasForm(response, 'place_image_form', PlaceImageCreateForm) self.assertHasForm(response, 'place_form', PlaceForm) -class TestPlaceListView(ViewTestCase, TestCase): +class TestPlaceListView(ViewTestCaseMixin, TestCase): view = PlaceListView @classmethod