mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +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:
parent
170f721367
commit
abb10db06f
2 changed files with 16 additions and 2 deletions
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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue