Fixed and restored assertions in OneToOneTests.test_foreign_key.
These assertions had been removed in34ba86706f
and7fe554b2a3
, seemingly because they were referencing the wrong objects, and so they started failing when the checking of object types (as well as PK values) was introduced.
This commit is contained in:
parent
4c123d0f79
commit
a973fb2d68
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue