mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Adjusted code style of a few test data setup methods.
Thanks Mariusz for suggesting it.
This commit is contained in:
parent
84e7a9f4a7
commit
7f63b894c0
7 changed files with 18 additions and 36 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue