Fixed #21089 -- Allow TransactionTestcase subclasses to define an empty list of fixtures.

Thanks to lgs for the report and initial patch.
This commit is contained in:
Baptiste Mispelon 2013-09-11 15:20:15 +02:00
parent 170f721367
commit abb10db06f
2 changed files with 16 additions and 2 deletions

View file

@ -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,