1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #32980 -- Made models cache related managers.

This commit is contained in:
Keryn Knight
2021-08-01 12:13:35 +01:00
committed by Mariusz Felisiak
parent ba9ced3e9a
commit 4f8c7fd9d9
10 changed files with 173 additions and 13 deletions

View File

@@ -354,6 +354,11 @@ class ModelInheritanceTest(TestCase):
parties = list(p4.bachelorparty_set.all())
self.assertEqual(parties, [bachelor, messy_parent])
def test_abstract_base_class_m2m_relation_inheritance_manager_reused(self):
p1 = Person.objects.create(name='Alice')
self.assertIs(p1.birthdayparty_set, p1.birthdayparty_set)
self.assertIs(p1.bachelorparty_set, p1.bachelorparty_set)
def test_abstract_verbose_name_plural_inheritance(self):
"""
verbose_name_plural correctly inherited from ABC if inheritance chain