summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/generic_relations_regress/tests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/generic_relations_regress/tests.py b/tests/generic_relations_regress/tests.py
index b2d5b08692..e6d350aa5b 100644
--- a/tests/generic_relations_regress/tests.py
+++ b/tests/generic_relations_regress/tests.py
@@ -48,6 +48,12 @@ class GenericRelationTests(TestCase):
TextLink.objects.create(content_object=oddrel)
oddrel.delete()
+ def test_coerce_object_id_remote_field_cache_persistence(self):
+ restaurant = Restaurant.objects.create()
+ CharLink.objects.create(content_object=restaurant)
+ charlink = CharLink.objects.latest('pk')
+ self.assertIs(charlink.content_object, charlink.content_object)
+
def test_q_object_or(self):
"""
SQL query parameters for generic relations are properly