diff --git a/tests/one_to_one/tests.py b/tests/one_to_one/tests.py index f59749f8cf..72d279b83c 100644 --- a/tests/one_to_one/tests.py +++ b/tests/one_to_one/tests.py @@ -96,12 +96,15 @@ class OneToOneTests(TestCase): assert_filter_waiters(restaurant__place__exact=self.p1.pk) assert_filter_waiters(restaurant__place__exact=self.p1) assert_filter_waiters(restaurant__place__pk=self.p1.pk) - assert_filter_waiters(restaurant__exact=self.p1.pk) - assert_filter_waiters(restaurant__pk=self.p1.pk) - assert_filter_waiters(restaurant=self.p1.pk) + assert_filter_waiters(restaurant__exact=self.r1.pk) + assert_filter_waiters(restaurant__exact=self.r1) + assert_filter_waiters(restaurant__pk=self.r1.pk) + assert_filter_waiters(restaurant=self.r1.pk) assert_filter_waiters(restaurant=self.r1) + assert_filter_waiters(id__exact=w.pk) + assert_filter_waiters(pk=w.pk) # Delete the restaurant; the waiter should also be removed - r = Restaurant.objects.get(pk=self.p1.pk) + r = Restaurant.objects.get(pk=self.r1.pk) r.delete() self.assertEqual(Waiter.objects.count(), 0)