diff --git a/tests/foreign_object/tests.py b/tests/foreign_object/tests.py
index 5c4c097..a1a8e29 100644
a
|
b
|
class MultiColumnFKTests(TestCase):
|
302 | 302 | normal_members_lists = [list(g.members.all()) for g in Group.objects.all()] |
303 | 303 | self.assertEqual(members_lists, normal_members_lists) |
304 | 304 | |
| 305 | def test_reverse_query(self): |
| 306 | membership = Membership.objects.create(membership_country=self.usa, person=self.bob, group=self.cia) |
| 307 | self.assertQuerysetEqual( |
| 308 | Group.objects.filter(membership=1), |
| 309 | ['<Group: CIA>'] |
| 310 | ) |
| 311 | self.assertQuerysetEqual( |
| 312 | Group.objects.exclude(membership=1), |
| 313 | [] |
| 314 | ) |
| 315 | |
305 | 316 | def test_prefetch_related_m2m_reverse_works(self): |
306 | 317 | Membership.objects.create(membership_country=self.usa, person=self.bob, group=self.cia) |
307 | 318 | Membership.objects.create(membership_country=self.usa, person=self.jim, group=self.democrat) |