From 94f63b926fd32d7a7b6e2591ef72aa8f040f25cc Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Fri, 23 Nov 2018 21:24:25 -0500 Subject: Refs #31395 -- Relied on setUpTestData() test data isolation in various tests. --- tests/contenttypes_tests/test_management.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/contenttypes_tests') diff --git a/tests/contenttypes_tests/test_management.py b/tests/contenttypes_tests/test_management.py index 65842aa09e..57d3757abe 100644 --- a/tests/contenttypes_tests/test_management.py +++ b/tests/contenttypes_tests/test_management.py @@ -20,9 +20,12 @@ class RemoveStaleContentTypesTests(TestCase): 'django.contrib.contenttypes', ] + @classmethod + def setUpTestData(cls): + cls.before_count = ContentType.objects.count() + cls.content_type = ContentType.objects.create(app_label='contenttypes_tests', model='Fake') + def setUp(self): - self.before_count = ContentType.objects.count() - self.content_type = ContentType.objects.create(app_label='contenttypes_tests', model='Fake') self.app_config = apps.get_app_config('contenttypes_tests') def test_interactive_true_with_dependent_objects(self): -- cgit v1.3