mirror of
https://github.com/django/django.git
synced 2025-11-25 21:22:14 +00:00
Refs #31395 -- Relied on setUpTestData() test data isolation in various tests.
This commit is contained in:
parent
3cf80d3fcf
commit
94f63b926f
14 changed files with 187 additions and 163 deletions
|
|
@ -35,12 +35,15 @@ request.user = MockSuperUser()
|
|||
|
||||
class ModelAdminTests(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.band = Band.objects.create(
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
cls.band = Band.objects.create(
|
||||
name='The Doors',
|
||||
bio='',
|
||||
sign_date=date(1965, 1, 1),
|
||||
)
|
||||
|
||||
def setUp(self):
|
||||
self.site = AdminSite()
|
||||
|
||||
def test_modeladmin_str(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue