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/validation | |
| parent | 9a7d336c3866c5226ed11868be0234c7e2fa47fa (diff) | |
| download | django-84e7a9f4a7bb3cad2bffae97baaae99de152c451.tar.gz | |
Switched setUp() to setUpTestData() where possible in Django's tests.
Diffstat (limited to 'tests/validation')
| -rw-r--r-- | tests/validation/tests.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/validation/tests.py b/tests/validation/tests.py index bc23ac5808..46fe2f0c7b 100644 --- a/tests/validation/tests.py +++ b/tests/validation/tests.py @@ -83,8 +83,9 @@ class ArticleForm(forms.ModelForm): class ModelFormsTests(TestCase): - def setUp(self): - self.author = Author.objects.create(name='Joseph Kocherhans') + @classmethod + def setUpTestData(cls): + cls.author = Author.objects.create(name='Joseph Kocherhans') def test_partial_validation(self): # Make sure the "commit=False and set field values later" idiom still |
