diff options
| author | Simon Charette <charette.s@gmail.com> | 2017-11-29 01:06:45 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-11-30 10:45:20 -0500 |
| commit | f319e7abad145ddcb1017293b5cdb7e09a92ee85 (patch) | |
| tree | 972e6d097f41f4ffa0f2e8491c449c28d593b38c /tests | |
| parent | 3545e844885608932a692d952c12cd863e2320b5 (diff) | |
[1.11.x] Fixed #28856 -- Fixed a regression in caching of a GenericForeignKey pointing to a MTI model.
Regression in b9f8635f58ad743995cad2081b3dc395e55761e5.
Backport of d31424fec1a3de9d281535c0503644a9d7b93c63 from stable/2.0.x
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/generic_relations_regress/tests.py | 6 |
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 |
