diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-08 12:27:04 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-08 19:25:02 +0100 |
| commit | 3278c31fa59b41d03aea167f4cf85f4ddf7f848d (patch) | |
| tree | 0c80b4868391296335580242c8e65052a4f62a6b /tests/foreign_object/tests.py | |
| parent | 6a682b38e75d4c975b4c4493565a59f1bc14397c (diff) | |
[4.0.x] Refs #33476 -- Refactored code to strictly match 88 characters line length.
Backport of 7119f40c9881666b6f9b5cf7df09ee1d21cc8344 from main.
Diffstat (limited to 'tests/foreign_object/tests.py')
| -rw-r--r-- | tests/foreign_object/tests.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/foreign_object/tests.py b/tests/foreign_object/tests.py index 99206e837f..6d5b8343cc 100644 --- a/tests/foreign_object/tests.py +++ b/tests/foreign_object/tests.py @@ -77,7 +77,8 @@ class MultiColumnFKTests(TestCase): group_id=self.cia.id, ) - # Creating an invalid membership because it has a different country has the person + # Creating an invalid membership because it has a different country has + # the person. Membership.objects.create( membership_country_id=self.soviet_union.id, person_id=self.bob.id, @@ -287,7 +288,7 @@ class MultiColumnFKTests(TestCase): membership_country=self.usa, person=self.jim, group=self.cia ) - # Let's check to make sure that it worked. Bob and Jim should be members of the CIA. + # Bob and Jim should be members of the CIA. self.assertQuerysetEqual( self.cia.members.all(), ["Bob", "Jim"], attrgetter("name") @@ -313,7 +314,8 @@ class MultiColumnFKTests(TestCase): # We start out by making sure that the Group 'CIA' has no members. self.assertQuerysetEqual(self.cia.members.all(), []) - # Something adds jane to group CIA but Jane is in Soviet Union which isn't CIA's country + # Something adds jane to group CIA but Jane is in Soviet Union which + # isn't CIA's country. Membership.objects.create( membership_country=self.usa, person=self.jane, group=self.cia ) @@ -325,7 +327,8 @@ class MultiColumnFKTests(TestCase): # We start out by making sure that Jane has no groups. self.assertQuerysetEqual(self.jane.groups.all(), []) - # Something adds jane to group CIA but Jane is in Soviet Union which isn't CIA's country + # Something adds jane to group CIA but Jane is in Soviet Union which + # isn't CIA's country. Membership.objects.create( membership_country=self.usa, person=self.jane, group=self.cia ) @@ -350,8 +353,9 @@ class MultiColumnFKTests(TestCase): def test_m2m_through_on_self_ignores_mismatch_columns(self): self.assertQuerysetEqual(self.jane.friends.all(), []) - # Note that we use ids instead of instances. This is because instances on ForeignObject - # properties will set all related field off of the given instance + # Note that we use ids instead of instances. This is because instances + # on ForeignObject properties will set all related field off of the + # given instance. Friendship.objects.create( from_friend_id=self.jane.id, to_friend_id=self.george.id, |
