summaryrefslogtreecommitdiff
path: root/tests/properties
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2018-11-23 20:59:38 -0500
committerTim Graham <timograham@gmail.com>2018-11-27 09:35:17 -0500
commit84e7a9f4a7bb3cad2bffae97baaae99de152c451 (patch)
treec81eeb6edf47ce0abdb7551cd28a3de354dfd20f /tests/properties
parent9a7d336c3866c5226ed11868be0234c7e2fa47fa (diff)
downloaddjango-84e7a9f4a7bb3cad2bffae97baaae99de152c451.tar.gz
Switched setUp() to setUpTestData() where possible in Django's tests.
Diffstat (limited to 'tests/properties')
-rw-r--r--tests/properties/tests.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/properties/tests.py b/tests/properties/tests.py
index 9ba28c0d0d..38f39a1dbb 100644
--- a/tests/properties/tests.py
+++ b/tests/properties/tests.py
@@ -5,9 +5,10 @@ from .models import Person
class PropertyTests(TestCase):
- def setUp(self):
- self.a = Person(first_name='John', last_name='Lennon')
- self.a.save()
+ @classmethod
+ def setUpTestData(cls):
+ cls.a = Person(first_name='John', last_name='Lennon')
+ cls.a.save()
def test_getter(self):
self.assertEqual(self.a.full_name, 'John Lennon')