diff options
Diffstat (limited to 'tests/modeladmin')
| -rw-r--r-- | tests/modeladmin/models.py | 3 | ||||
| -rw-r--r-- | tests/modeladmin/tests.py | 15 |
2 files changed, 11 insertions, 7 deletions
diff --git a/tests/modeladmin/models.py b/tests/modeladmin/models.py index 8f69b42874..54291354bc 100644 --- a/tests/modeladmin/models.py +++ b/tests/modeladmin/models.py @@ -37,7 +37,8 @@ class ValidationTestModel(models.Model): is_active = models.BooleanField(default=False) pub_date = models.DateTimeField() band = models.ForeignKey(Band, models.CASCADE) - no = models.IntegerField(verbose_name="Number", blank=True, null=True) # This field is intentionally 2 characters long. See #16080. + # This field is intentionally 2 characters long (#16080). + no = models.IntegerField(verbose_name="Number", blank=True, null=True) def decade_published_in(self): return self.pub_date.strftime('%Y')[:3] + "0's" diff --git a/tests/modeladmin/tests.py b/tests/modeladmin/tests.py index beeb493560..eb99764398 100644 --- a/tests/modeladmin/tests.py +++ b/tests/modeladmin/tests.py @@ -1029,9 +1029,11 @@ class ListDisplayLinksCheckTests(CheckTestCase): list_display_links = ('non_existent_field',) self.assertIsInvalid( - ValidationTestModelAdmin, ValidationTestModel, - "The value of 'list_display_links[0]' refers to 'non_existent_field', which is not defined in 'list_display'.", - 'admin.E111') + ValidationTestModelAdmin, ValidationTestModel, ( + "The value of 'list_display_links[0]' refers to " + "'non_existent_field', which is not defined in 'list_display'." + ), 'admin.E111' + ) def test_missing_in_list_display(self): class ValidationTestModelAdmin(ModelAdmin): @@ -1244,9 +1246,10 @@ class OrderingCheckTests(CheckTestCase): self.assertIsInvalid( ValidationTestModelAdmin, - ValidationTestModel, - "The value of 'ordering[0]' refers to 'non_existent_field', which is not an attribute of 'modeladmin.ValidationTestModel'.", - 'admin.E033', + ValidationTestModel, ( + "The value of 'ordering[0]' refers to 'non_existent_field', " + "which is not an attribute of 'modeladmin.ValidationTestModel'." + ), 'admin.E033' ) def test_random_marker_not_alone(self): |
