diff options
| author | Simon Charette <charette.s@gmail.com> | 2018-11-23 21:24:25 -0500 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-05-15 20:22:56 +0200 |
| commit | 94f63b926fd32d7a7b6e2591ef72aa8f040f25cc (patch) | |
| tree | 427aa4855f08fa75d386118765fcb0035ea07052 /tests/modeladmin/tests.py | |
| parent | 3cf80d3fcf7446afdde16a2be515c423f720e54d (diff) | |
Refs #31395 -- Relied on setUpTestData() test data isolation in various tests.
Diffstat (limited to 'tests/modeladmin/tests.py')
| -rw-r--r-- | tests/modeladmin/tests.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/modeladmin/tests.py b/tests/modeladmin/tests.py index 6934bf2b3c..74db14d5ac 100644 --- a/tests/modeladmin/tests.py +++ b/tests/modeladmin/tests.py @@ -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): |
