diff options
author | Simon Charette <charette.s@gmail.com> | 2018-11-24 06:28:28 -0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2018-11-27 09:48:22 -0500 |
commit | 7f63b894c02effb09c15ab0b40d28b89553b8e37 (patch) | |
tree | 03802b01266db92834562ae80cf73c97b0cb8f5a /tests/foreign_object | |
parent | 84e7a9f4a7bb3cad2bffae97baaae99de152c451 (diff) | |
download | django-7f63b894c02effb09c15ab0b40d28b89553b8e37.tar.gz |
Adjusted code style of a few test data setup methods.
Thanks Mariusz for suggesting it.
Diffstat (limited to 'tests/foreign_object')
-rw-r--r-- | tests/foreign_object/tests.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/foreign_object/tests.py b/tests/foreign_object/tests.py index 2469250a12..7fed5557eb 100644 --- a/tests/foreign_object/tests.py +++ b/tests/foreign_object/tests.py @@ -24,10 +24,7 @@ class MultiColumnFKTests(TestCase): cls.usa = Country.objects.create(name="United States of America") cls.soviet_union = Country.objects.create(name="Soviet Union") # Creating People - cls.bob = Person() - cls.bob.name = 'Bob' - cls.bob.person_country = cls.usa - cls.bob.save() + cls.bob = Person.objects.create(name='Bob', person_country=cls.usa) cls.jim = Person.objects.create(name='Jim', person_country=cls.usa) cls.george = Person.objects.create(name='George', person_country=cls.usa) |