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

Refs #29408 -- Cosmetic edits for validation of related fields and lookups in model Meta.ordering.

Follow up to 440505cb2c.
This commit is contained in:
Mariusz Felisiak
2019-03-01 19:38:21 +01:00
committed by GitHub
parent fe65918dca
commit f69c7bbdce
4 changed files with 16 additions and 12 deletions

View File

@@ -632,7 +632,8 @@ class OtherModelTests(SimpleTestCase):
self.assertEqual(Model.check(), [
Error(
"'ordering' refers to the nonexistent field 'relation'.",
"'ordering' refers to the nonexistent field, related field, "
"or lookup 'relation'.",
obj=Model,
id='models.E015',
),
@@ -645,7 +646,8 @@ class OtherModelTests(SimpleTestCase):
self.assertEqual(Model.check(), [
Error(
"'ordering' refers to the nonexistent field 'missing_field'.",
"'ordering' refers to the nonexistent field, related field, "
"or lookup 'missing_field'.",
obj=Model,
id='models.E015',
)
@@ -660,7 +662,8 @@ class OtherModelTests(SimpleTestCase):
self.assertEqual(Model.check(), [
Error(
"'ordering' refers to the nonexistent field 'missing_fk_field_id'.",
"'ordering' refers to the nonexistent field, related field, "
"or lookup 'missing_fk_field_id'.",
obj=Model,
id='models.E015',
)
@@ -675,7 +678,7 @@ class OtherModelTests(SimpleTestCase):
self.assertEqual(Model.check(), [
Error(
"'ordering' refers to the nonexistent field, related field "
"'ordering' refers to the nonexistent field, related field, "
"or lookup 'missing_related__id'.",
obj=Model,
id='models.E015',
@@ -694,7 +697,7 @@ class OtherModelTests(SimpleTestCase):
self.assertEqual(Child.check(), [
Error(
"'ordering' refers to the nonexistent field, related field "
"'ordering' refers to the nonexistent field, related field, "
"or lookup 'parent__missing_field'.",
obj=Child,
id='models.E015',
@@ -710,7 +713,7 @@ class OtherModelTests(SimpleTestCase):
self.assertEqual(Child.check(), [
Error(
"'ordering' refers to the nonexistent field, related field "
"'ordering' refers to the nonexistent field, related field, "
"or lookup 'parent__missing_field'.",
obj=Child,
id='models.E015',
@@ -732,7 +735,7 @@ class OtherModelTests(SimpleTestCase):
self.assertEqual(Child.check(), [
Error(
"'ordering' refers to the nonexistent field, related field "
"'ordering' refers to the nonexistent field, related field, "
"or lookup 'parent1__parent2__missing_field'.",
obj=Child,
id='models.E015',