From abb10db06fb2ecb3e897462ec72417d10b39b8a4 Mon Sep 17 00:00:00 2001 From: Baptiste Mispelon Date: Wed, 11 Sep 2013 15:20:15 +0200 Subject: Fixed #21089 -- Allow TransactionTestcase subclasses to define an empty list of fixtures. Thanks to lgs for the report and initial patch. --- tests/fixtures/tests.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests') diff --git a/tests/fixtures/tests.py b/tests/fixtures/tests.py index c24e0806fa..a1ecf007ce 100644 --- a/tests/fixtures/tests.py +++ b/tests/fixtures/tests.py @@ -24,6 +24,17 @@ class TestCaseFixtureLoadingTests(TestCase): ]) +class SubclassTestCaseFixtureLoadingTests(TestCaseFixtureLoadingTests): + """ + Make sure that subclasses can remove fixtures from parent class (#21089). + """ + fixtures = [] + + def testClassFixtures(self): + "Check that there were no fixture objects installed" + self.assertEqual(Article.objects.count(), 0) + + class DumpDataAssertMixin(object): def _dumpdata_assert(self, args, output, format='json', natural_keys=False, -- cgit v1.3