summaryrefslogtreecommitdiff
path: root/tests/properties
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2018-11-24 06:28:28 -0500
committerTim Graham <timograham@gmail.com>2018-11-27 09:48:22 -0500
commit7f63b894c02effb09c15ab0b40d28b89553b8e37 (patch)
tree03802b01266db92834562ae80cf73c97b0cb8f5a /tests/properties
parent84e7a9f4a7bb3cad2bffae97baaae99de152c451 (diff)
downloaddjango-7f63b894c02effb09c15ab0b40d28b89553b8e37.tar.gz
Adjusted code style of a few test data setup methods.
Thanks Mariusz for suggesting it.
Diffstat (limited to 'tests/properties')
-rw-r--r--tests/properties/tests.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/properties/tests.py b/tests/properties/tests.py
index 38f39a1dbb..ce29668644 100644
--- a/tests/properties/tests.py
+++ b/tests/properties/tests.py
@@ -7,8 +7,7 @@ class PropertyTests(TestCase):
@classmethod
def setUpTestData(cls):
- cls.a = Person(first_name='John', last_name='Lennon')
- cls.a.save()
+ cls.a = Person.objects.create(first_name='John', last_name='Lennon')
def test_getter(self):
self.assertEqual(self.a.full_name, 'John Lennon')