summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-05-19 12:47:10 -0400
committerTim Graham <timograham@gmail.com>2017-05-19 21:09:42 -0400
commitf2b8fa1763116a9b8fbe7791a4b009c95cf8c0b1 (patch)
treed120201d1d5b1c996647920414916b06f37d71b1 /tests
parent566726ff964b004f2a6adecc1e51197bc34d78d2 (diff)
[1.11.x] Fixed #28210 -- Fixed Model._state.adding on MTI parent model after saving child model.
Regression in 38575b007a722d6af510ea46d46393a4cda9ca29. Backport of 59ab1b2683b6c090dc409d9eb8303aadbd590c04 from master
Diffstat (limited to 'tests')
-rw-r--r--tests/model_inheritance_regress/tests.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/model_inheritance_regress/tests.py b/tests/model_inheritance_regress/tests.py
index c91d7cb853..ca583e7d20 100644
--- a/tests/model_inheritance_regress/tests.py
+++ b/tests/model_inheritance_regress/tests.py
@@ -480,8 +480,9 @@ class ModelInheritanceTest(TestCase):
# The mismatch between Restaurant and Place is intentional (#28175).
self.assertSequenceEqual(Supplier.objects.filter(restaurant__in=Place.objects.all()), [s])
- def test_ptr_accessor_assigns_db(self):
+ def test_ptr_accessor_assigns_state(self):
r = Restaurant.objects.create()
+ self.assertIs(r.place_ptr._state.adding, False)
self.assertEqual(r.place_ptr._state.db, 'default')
def test_related_filtering_query_efficiency_ticket_15844(self):