summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCollin Anderson <cmawebsite@gmail.com>2016-08-18 12:45:27 -0400
committerTim Graham <timograham@gmail.com>2016-08-23 16:00:12 -0400
commit384f89f8f843953ac11cf211f85291b5c14baeb9 (patch)
tree3a906d4afd8f449a9ae42b49833045a3606bc634 /tests
parenta3db480393d0065fc69834057f0e02a4afc65df9 (diff)
Fixed #26998 -- Reverted some admin checks from checking field.many_to_many back to isinstance(field, models.ManyToManyField).
This partially reverts 983c158da7723eb00a376bd31db76709da4d0260
Diffstat (limited to 'tests')
-rw-r--r--tests/admin_checks/tests.py6
-rw-r--r--tests/modeladmin/tests.py4
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/admin_checks/tests.py b/tests/admin_checks/tests.py
index c584cd42c9..2cf7f66d9d 100644
--- a/tests/admin_checks/tests.py
+++ b/tests/admin_checks/tests.py
@@ -583,7 +583,7 @@ class SystemChecksTestCase(SimpleTestCase):
errors = BookAdmin(Book, AdminSite()).check()
expected = [
checks.Error(
- "The value of 'fields' cannot include the many-to-many field 'authors' "
+ "The value of 'fields' cannot include the ManyToManyField 'authors', "
"because that field manually specifies a relationship model.",
obj=BookAdmin,
id='admin.E013',
@@ -601,8 +601,8 @@ class SystemChecksTestCase(SimpleTestCase):
errors = FieldsetBookAdmin(Book, AdminSite()).check()
expected = [
checks.Error(
- "The value of 'fieldsets[1][1][\"fields\"]' cannot include the many-to-many field "
- "'authors' because that field manually specifies a relationship model.",
+ "The value of 'fieldsets[1][1][\"fields\"]' cannot include the ManyToManyField "
+ "'authors', because that field manually specifies a relationship model.",
obj=FieldsetBookAdmin,
id='admin.E013',
)
diff --git a/tests/modeladmin/tests.py b/tests/modeladmin/tests.py
index 40ea025baf..d19093334a 100644
--- a/tests/modeladmin/tests.py
+++ b/tests/modeladmin/tests.py
@@ -925,7 +925,7 @@ class PrepopulatedFieldsCheckTests(CheckTestCase):
self.assertIsInvalid(
ValidationTestModelAdmin, ValidationTestModel,
("The value of 'prepopulated_fields' refers to 'users', which must not be "
- "a DateTimeField, a foreign key, or a many-to-many field."),
+ "a DateTimeField, a ForeignKey, or a ManyToManyField."),
'admin.E028')
def test_valid_case(self):
@@ -963,7 +963,7 @@ class ListDisplayTests(CheckTestCase):
self.assertIsInvalid(
ValidationTestModelAdmin, ValidationTestModel,
- "The value of 'list_display[0]' must not be a many-to-many field.",
+ "The value of 'list_display[0]' must not be a ManyToManyField.",
'admin.E109')
def test_valid_case(self):