mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
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:
11
tests/fixtures/tests.py
vendored
11
tests/fixtures/tests.py
vendored
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user