diff options
| author | Baptiste Mispelon <bmispelon@gmail.com> | 2013-09-11 15:20:15 +0200 |
|---|---|---|
| committer | Baptiste Mispelon <bmispelon@gmail.com> | 2013-09-11 15:28:04 +0200 |
| commit | abb10db06fb2ecb3e897462ec72417d10b39b8a4 (patch) | |
| tree | 6f850ba160ea4e88ce40f4c4ead699dcbd1bbc54 /tests | |
| parent | 170f72136758add6c9c0c59240cfce73d5672cc2 (diff) | |
Fixed #21089 -- Allow TransactionTestcase subclasses to define an empty list of fixtures.
Thanks to lgs for the report and initial patch.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/fixtures/tests.py | 11 |
1 files changed, 11 insertions, 0 deletions
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, |
