diff options
author | Tim Graham <timograham@gmail.com> | 2017-02-02 20:43:21 -0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2017-02-03 08:01:45 -0500 |
commit | 29f607927fe82e2c8baab171dfa8baf710cd9b83 (patch) | |
tree | f525c6c4784ccafe77e01f706093fa6f4a5c9481 /tests/admin_checks | |
parent | a21ec12409a5b72d602cd03ee925b6ceb1cd5492 (diff) | |
download | django-29f607927fe82e2c8baab171dfa8baf710cd9b83.tar.gz |
Fixed spelling of "nonexistent".
Diffstat (limited to 'tests/admin_checks')
-rw-r--r-- | tests/admin_checks/tests.py | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/tests/admin_checks/tests.py b/tests/admin_checks/tests.py index e081caeca1..5419fc1009 100644 --- a/tests/admin_checks/tests.py +++ b/tests/admin_checks/tests.py @@ -344,7 +344,10 @@ class SystemChecksTestCase(SimpleTestCase): self.assertEqual(errors, expected) def test_generic_inline_model_admin_bad_ct_field(self): - "A GenericInlineModelAdmin raises problems if the ct_field points to a non-existent field." + """ + A GenericInlineModelAdmin errors if the ct_field points to a + nonexistent field. + """ class InfluenceInline(GenericStackedInline): model = Influence ct_field = 'nonexistent' @@ -363,7 +366,10 @@ class SystemChecksTestCase(SimpleTestCase): self.assertEqual(errors, expected) def test_generic_inline_model_admin_bad_fk_field(self): - "A GenericInlineModelAdmin raises problems if the ct_fk_field points to a non-existent field." + """ + A GenericInlineModelAdmin errors if the ct_fk_field points to a + nonexistent field. + """ class InfluenceInline(GenericStackedInline): model = Influence ct_fk_field = 'nonexistent' @@ -428,18 +434,15 @@ class SystemChecksTestCase(SimpleTestCase): self.assertEqual(errors, expected) def test_app_label_in_admin_checks(self): - """ - Regression test for #15669 - Include app label in admin system check messages - """ - class RawIdNonexistingAdmin(admin.ModelAdmin): - raw_id_fields = ('nonexisting',) + class RawIdNonexistentAdmin(admin.ModelAdmin): + raw_id_fields = ('nonexistent',) - errors = RawIdNonexistingAdmin(Album, AdminSite()).check() + errors = RawIdNonexistentAdmin(Album, AdminSite()).check() expected = [ checks.Error( - "The value of 'raw_id_fields[0]' refers to 'nonexisting', " + "The value of 'raw_id_fields[0]' refers to 'nonexistent', " "which is not an attribute of 'admin_checks.Album'.", - obj=RawIdNonexistingAdmin, + obj=RawIdNonexistentAdmin, id='admin.E002', ) ] |