diff options
author | Simon Charette <charette.s@gmail.com> | 2018-11-23 20:59:38 -0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2018-11-27 09:35:17 -0500 |
commit | 84e7a9f4a7bb3cad2bffae97baaae99de152c451 (patch) | |
tree | c81eeb6edf47ce0abdb7551cd28a3de354dfd20f /tests/admin_changelist | |
parent | 9a7d336c3866c5226ed11868be0234c7e2fa47fa (diff) | |
download | django-84e7a9f4a7bb3cad2bffae97baaae99de152c451.tar.gz |
Switched setUp() to setUpTestData() where possible in Django's tests.
Diffstat (limited to 'tests/admin_changelist')
-rw-r--r-- | tests/admin_changelist/tests.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/admin_changelist/tests.py b/tests/admin_changelist/tests.py index ccf115a2e4..d0468e725b 100644 --- a/tests/admin_changelist/tests.py +++ b/tests/admin_changelist/tests.py @@ -50,9 +50,12 @@ def build_tbody_html(pk, href, extra_fields): @override_settings(ROOT_URLCONF="admin_changelist.urls") class ChangeListTests(TestCase): + @classmethod + def setUpTestData(cls): + cls.superuser = User.objects.create_superuser(username='super', email='a@b.com', password='xxx') + def setUp(self): self.factory = RequestFactory() - self.superuser = User.objects.create_superuser(username='super', email='a@b.com', password='xxx') def _create_superuser(self, username): return User.objects.create_superuser(username=username, email='a@b.com', password='xxx') |