summaryrefslogtreecommitdiff
path: root/tests/contenttypes_tests/tests.py
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2014-03-03 18:18:39 +0800
committerRussell Keith-Magee <russell@keith-magee.com>2014-03-03 18:18:39 +0800
commit82ac3894867b111f83252e808b3ed47f38ef5378 (patch)
treebdfc43929a4b8e0cd1e973bca68afebb6d917208 /tests/contenttypes_tests/tests.py
parentbc4dc6e99c532b844a26c8a9021a4d04703e28cd (diff)
Edited model and field checks for grammar and consistency.
Diffstat (limited to 'tests/contenttypes_tests/tests.py')
-rw-r--r--tests/contenttypes_tests/tests.py24
1 files changed, 11 insertions, 13 deletions
diff --git a/tests/contenttypes_tests/tests.py b/tests/contenttypes_tests/tests.py
index dc78985dac..af2cedd8b3 100644
--- a/tests/contenttypes_tests/tests.py
+++ b/tests/contenttypes_tests/tests.py
@@ -233,13 +233,11 @@ class GenericRelationshipTests(IsolatedModelsTestCase):
errors = Model.rel.field.check()
expected = [
checks.Error(
- ('The field has a relation with model MissingModel, '
- 'which has either not been installed or is abstract.'),
- hint=('Ensure that you did not misspell the model name and '
- 'the model is not abstract. Does your INSTALLED_APPS '
- 'setting contain the app where MissingModel is defined?'),
+ ("Field defines a relation with model 'MissingModel', "
+ "which is either not installed, or is abstract."),
+ hint=None,
obj=Model.rel.field,
- id='E030',
+ id='fields.E300',
)
]
self.assertEqual(errors, expected)
@@ -295,12 +293,12 @@ class GenericRelationshipTests(IsolatedModelsTestCase):
errors = Model.rel.field.check()
expected = [
checks.Error(
- ('The field defines a relation with the model '
- 'contenttypes_tests.SwappedModel, '
- 'which has been swapped out.'),
- hint='Update the relation to point at settings.TEST_SWAPPED_MODEL',
+ ("Field defines a relation with the model "
+ "'contenttypes_tests.SwappedModel', "
+ "which has been swapped out."),
+ hint="Update the relation to point at 'settings.TEST_SWAPPED_MODEL'.",
obj=Model.rel.field,
- id='E029',
+ id='fields.E301',
)
]
self.assertEqual(errors, expected)
@@ -317,10 +315,10 @@ class GenericRelationshipTests(IsolatedModelsTestCase):
errors = InvalidBookmark.tags_.field.check()
expected = [
checks.Error(
- 'Field names must not end with underscores.',
+ 'Field names must not end with an underscore.',
hint=None,
obj=InvalidBookmark.tags_.field,
- id='E001',
+ id='fields.E001',
)
]
self.assertEqual(errors, expected)