summaryrefslogtreecommitdiff
path: root/tests/model_inheritance_regress
diff options
context:
space:
mode:
Diffstat (limited to 'tests/model_inheritance_regress')
-rw-r--r--tests/model_inheritance_regress/tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/model_inheritance_regress/tests.py b/tests/model_inheritance_regress/tests.py
index 9cb710c4b8..87ec11a5b1 100644
--- a/tests/model_inheritance_regress/tests.py
+++ b/tests/model_inheritance_regress/tests.py
@@ -472,6 +472,10 @@ class ModelInheritanceTest(TestCase):
jane = Supplier.objects.order_by("name").select_related("restaurant")[0]
self.assertEqual(jane.restaurant.name, "Craft")
+ def test_ptr_accessor_assigns_db(self):
+ r = Restaurant.objects.create()
+ self.assertEqual(r.place_ptr._state.db, 'default')
+
def test_related_filtering_query_efficiency_ticket_15844(self):
r = Restaurant.objects.create(
name="Guido's House of Pasta",