summaryrefslogtreecommitdiff
path: root/tests/model_inheritance_regress
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 13:22:17 -0400
commit59ab1b2683b6c090dc409d9eb8303aadbd590c04 (patch)
tree0e23f7ab66be3bb1b721654fbc129c1b3ada2961 /tests/model_inheritance_regress
parent99df304c856ac2f6ee18418ea8ca3e2dc7b47dac (diff)
downloaddjango-59ab1b2683b6c090dc409d9eb8303aadbd590c04.tar.gz
Fixed #28210 -- Fixed Model._state.adding on MTI parent model after saving child model.
Regression in 38575b007a722d6af510ea46d46393a4cda9ca29.
Diffstat (limited to 'tests/model_inheritance_regress')
-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 0ecaedd090..7ed84cc5d0 100644
--- a/tests/model_inheritance_regress/tests.py
+++ b/tests/model_inheritance_regress/tests.py
@@ -478,8 +478,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):