diff options
author | Adam Alton <adamalton@gmail.com> | 2014-11-25 11:07:22 +0000 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2014-11-25 09:47:32 -0500 |
commit | a973fb2d68f2e23e599a601fdaec13d129207e9f (patch) | |
tree | b88a9861227c58a6d186b430d94615722c22fa13 /tests/one_to_one | |
parent | 4c123d0f79b3f417ec5b030c616365882e734a1e (diff) | |
download | django-a973fb2d68f2e23e599a601fdaec13d129207e9f.tar.gz |
Fixed and restored assertions in OneToOneTests.test_foreign_key.
These assertions had been removed in 34ba86706f and 7fe554b2a3,
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.
Diffstat (limited to 'tests/one_to_one')
-rw-r--r-- | tests/one_to_one/tests.py | 11 |
1 files changed, 7 insertions, 4 deletions
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) |