summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/model_inheritance_regress/models.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/regressiontests/model_inheritance_regress/models.py b/tests/regressiontests/model_inheritance_regress/models.py
index 5e79068461..2777d1f23a 100644
--- a/tests/regressiontests/model_inheritance_regress/models.py
+++ b/tests/regressiontests/model_inheritance_regress/models.py
@@ -77,6 +77,16 @@ class M2MBase(models.Model):
class M2MChild(M2MBase):
name = models.CharField(max_length=50)
+class Evaluation(Article):
+ quality = models.IntegerField()
+
+ class Meta:
+ abstract = True
+
+class QualityControl(Evaluation):
+ assignee = models.CharField(max_length=50)
+
+
__test__ = {'API_TESTS':"""
# Regression for #7350, #7202
# Check that when you create a Parent object with a specific reference to an
@@ -242,4 +252,9 @@ DoesNotExist: ArticleWithAuthor matching query does not exist.
>>> M2MChild.objects.filter(articles__isnull=False)
[]
+# All fields from an ABC, including those inherited non-abstractly should be
+# available on child classes (#7588). Creating this instance should work
+# without error.
+>>> _ = QualityControl.objects.create(headline="Problems in Django", pub_date=datetime.datetime.now(), quality=10, assignee="adrian")
+
"""}