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

[1.2.X] Fixed #11369 -- Corrected verbose_name_plural model Meta option to be consistent with verbose_name when using abstract model inheritance. Thanks Beetle_B for the report.

Backport of [14588] from trunk

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14589 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Ramiro Morales
2010-11-17 12:24:47 +00:00
parent 03b111c6cc
commit 8acad926df
3 changed files with 29 additions and 3 deletions

View File

@@ -8,7 +8,7 @@ from regressiontests.model_inheritance_regress.models import (
Place, Restaurant, ItalianRestaurant, ParkingLot, ParkingLot2,
ParkingLot3, Supplier, Wholesaler, Child, SelfRefChild, ArticleWithAuthor,
M2MChild, QualityControl, DerivedM, Person, BirthdayParty, BachelorParty,
MessyBachelorParty)
MessyBachelorParty, InternalCertificationAudit)
class ModelInheritanceTest(TestCase):
def test_model_inheritance(self):
@@ -353,3 +353,14 @@ class ModelInheritanceTest(TestCase):
parties = list(p4.bachelorparty_set.all())
self.assertEqual(parties, [bachelor, messy_parent])
def test_11369(self):
"""verbose_name_plural correctly inherited from ABC if inheritance chain includes an abstract model."""
# Regression test for #11369: verbose_name_plural should be inherited
# from an ABC even when there are one or more intermediate
# abstract models in the inheritance chain, for consistency with
# verbose_name.
self.assertEquals(
InternalCertificationAudit._meta.verbose_name_plural,
u'Audits'
)