Author: russellm
Date: 2010-10-11 20:02:57 -0500 (Mon, 11 Oct 2010)
New Revision: 14174

Modified:
   django/branches/releases/1.2.X/tests/modeltests/many_to_one_null/tests.py
Log:
[1.2.X] Tweak to many_to_one_null doctest to avoid primary key assumptions 
(causing breakage on PostgreSQL).

Backport of r14168 from trunk.

Modified: 
django/branches/releases/1.2.X/tests/modeltests/many_to_one_null/tests.py
===================================================================
--- django/branches/releases/1.2.X/tests/modeltests/many_to_one_null/tests.py   
2010-10-12 01:02:37 UTC (rev 14173)
+++ django/branches/releases/1.2.X/tests/modeltests/many_to_one_null/tests.py   
2010-10-12 01:02:57 UTC (rev 14174)
@@ -40,7 +40,7 @@
     def test_created_without_related(self):
         self.assertEqual(self.a3.reporter, None)
         # Need to reget a3 to refresh the cache
-        a3 = Article.objects.get(pk=3)
+        a3 = Article.objects.get(pk=self.a3.pk)
         self.assertRaises(AttributeError, getattr, a3.reporter, 'id')
         # Accessing an article's 'reporter' attribute returns None
         # if the reporter is set to None.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to