Quellcode durchsuchen

Fix tests initial data

Denis K vor 8 Jahren
Ursprung
Commit
35e325650c
2 geänderte Dateien mit 4 neuen und 6 gelöschten Zeilen
  1. 1 3
      jet/tests/test_filters.py
  2. 3 3
      jet/tests/test_tags.py

+ 1 - 3
jet/tests/test_filters.py

@@ -11,10 +11,8 @@ except ImportError: # Django 1.6
 
 
 class FiltersTestCase(TestCase):
-    models = []
-    factory = None
-
     def setUp(self):
+        self.models = []
         self.factory = RequestFactory()
         self.models.append(TestModel.objects.create(field1='first', field2=1))
         self.models.append(TestModel.objects.create(field1='second', field2=2))

+ 3 - 3
jet/tests/test_tags.py

@@ -6,10 +6,10 @@ from jet.tests.models import TestModel, SearchableTestModel
 
 
 class TagsTestCase(TestCase):
-    models = []
-    searchable_models = []
-
     def setUp(self):
+        self.models = []
+        self.searchable_models = []
+
         self.models.append(TestModel.objects.create(field1='first', field2=1))
         self.models.append(TestModel.objects.create(field1='second', field2=2))
         self.searchable_models.append(SearchableTestModel.objects.create(field1='first', field2=1))