summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAnssi Kääriäinen <akaariai@gmail.com>2013-11-17 15:50:14 +0200
committerAnssi Kääriäinen <akaariai@gmail.com>2014-02-04 15:21:13 +0200
commit0f272629ca18e440aef67b4a3fd9377a57fb25a8 (patch)
treef9126aa889153f77e32a4c0dbdf255088fc04b72 /tests
parent5f42c0219550b62e62db6e0f3834671a994e3cd8 (diff)
[1.6.x] Fixed #21413 -- resolve_columns fields misalignment
Backpatch of 9918c11114ac3ec9622631558ef26ebf3919cb69 from master. Conflicts: django/db/models/sql/compiler.py tests/model_inheritance_regress/tests.py
Diffstat (limited to 'tests')
-rw-r--r--tests/model_inheritance_regress/tests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/model_inheritance_regress/tests.py b/tests/model_inheritance_regress/tests.py
index 28635a29a9..54a9c1a0e1 100644
--- a/tests/model_inheritance_regress/tests.py
+++ b/tests/model_inheritance_regress/tests.py
@@ -441,3 +441,9 @@ class ModelInheritanceTest(TestCase):
# used in the qs and top contains direct pointer to the bottom model.
qs = ItalianRestaurant.objects.values_list('serves_gnocchi').filter(name='foo')
self.assertEqual(str(qs.query).count('JOIN'), 1)
+
+ def test_inheritance_resolve_columns(self):
+ Restaurant.objects.create(name='Bobs Cafe', address="Somewhere",
+ serves_pizza=True, serves_hot_dogs=True)
+ p = Place.objects.all().select_related('restaurant')[0]
+ self.assertIsInstance(p.restaurant.serves_pizza, bool)