Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.2.X] Tweak to many_to_one_null doctest to avoid primary key assump…

…tions (causing breakage on PostgreSQL).

Backport of r14168 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14174 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 5f8332af049efc878a4c906e75e90708e90830b3 1 parent 6f7f1f6
Russell Keith-Magee authored
2  tests/modeltests/many_to_one_null/tests.py
@@ -40,7 +40,7 @@ def test_related_set(self):
40 40
     def test_created_without_related(self):
41 41
         self.assertEqual(self.a3.reporter, None)
42 42
         # Need to reget a3 to refresh the cache
43  
-        a3 = Article.objects.get(pk=3)
  43
+        a3 = Article.objects.get(pk=self.a3.pk)
44 44
         self.assertRaises(AttributeError, getattr, a3.reporter, 'id')
45 45
         # Accessing an article's 'reporter' attribute returns None
46 46
         # if the reporter is set to None.

0 notes on commit 5f8332a

Please sign in to comment.
Something went wrong with that request. Please try again.