summaryrefslogtreecommitdiff
path: root/tests/modeltests/proxy_models/tests.py
diff options
context:
space:
mode:
authorIan Kelly <ian.g.kelly@gmail.com>2011-03-10 00:04:43 +0000
committerIan Kelly <ian.g.kelly@gmail.com>2011-03-10 00:04:43 +0000
commitec7dd583f2b33aa9a575530fbec215426348fdf6 (patch)
treeff98d0dcfa506719d905d2a408663b5390673830 /tests/modeltests/proxy_models/tests.py
parent317f30a77f744281137cde87ca59855761c8e86e (diff)
[1.2.X] Fixed a bunch more tests that were failing in Oracle due to false assumptions about the primary keys of objects.
Backport of r15789 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15790 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/modeltests/proxy_models/tests.py')
-rw-r--r--tests/modeltests/proxy_models/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/modeltests/proxy_models/tests.py b/tests/modeltests/proxy_models/tests.py
index 346a2a3296..0a46a252c5 100644
--- a/tests/modeltests/proxy_models/tests.py
+++ b/tests/modeltests/proxy_models/tests.py
@@ -39,11 +39,11 @@ class ProxyModelTests(TestCase):
"""
Creating a Person makes them accessible through the MyPerson proxy.
"""
- Person.objects.create(name="Foo McBar")
+ person = Person.objects.create(name="Foo McBar")
self.assertEqual(len(Person.objects.all()), 1)
self.assertEqual(len(MyPerson.objects.all()), 1)
- self.assertEqual(MyPerson.objects.get(name="Foo McBar").id, 1)
- self.assertFalse(MyPerson.objects.get(id=1).has_special_name())
+ self.assertEqual(MyPerson.objects.get(name="Foo McBar").id, person.id)
+ self.assertFalse(MyPerson.objects.get(id=person.id).has_special_name())
def test_no_proxy(self):
"""