Author: russellm
Date: 2010-10-11 19:56:40 -0500 (Mon, 11 Oct 2010)
New Revision: 14168
Modified:
django/trunk/tests/modeltests/many_to_one_null/tests.py
Log:
Tweak to many_to_one_null doctest to avoid primary key assumptions (causing
breakage on PostgreSQL).
Modified: django/trunk/tests/modeltests/many_to_one_null/tests.py
===================================================================
--- django/trunk/tests/modeltests/many_to_one_null/tests.py 2010-10-12
00:56:19 UTC (rev 14167)
+++ django/trunk/tests/modeltests/many_to_one_null/tests.py 2010-10-12
00:56:40 UTC (rev 14168)
@@ -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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.