diff options
| author | Alasdair Nicol <alasdair@thenicols.net> | 2015-08-01 22:32:51 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-08-03 08:59:13 -0400 |
| commit | 7a8460191eabcbe3b63deeebcde7c7097f62bb08 (patch) | |
| tree | 7850869c381230599570ca77a5cfadc527c8ea2d /tests/admin_checks | |
| parent | f32bb3adf039b72cea34347022626231d187e303 (diff) | |
[1.8.x] Fixed #25206 -- Fixed error message when checking a ModelAdmin fieldset's fields.
Backport of 8972818289452d611d97fac0f4a6d24625987b31 from master
Diffstat (limited to 'tests/admin_checks')
| -rw-r--r-- | tests/admin_checks/tests.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/admin_checks/tests.py b/tests/admin_checks/tests.py index 647a3d0eb4..e4e09d795b 100644 --- a/tests/admin_checks/tests.py +++ b/tests/admin_checks/tests.py @@ -126,7 +126,7 @@ class SystemChecksTestCase(TestCase): def test_fieldsets_fields_non_tuple(self): """ - Tests for a tuple/list within fieldsets[1]['fields']. + Tests for a tuple/list for the first fieldset's fields. """ class NotATupleAdmin(admin.ModelAdmin): list_display = ["pk", "title"] @@ -140,7 +140,7 @@ class SystemChecksTestCase(TestCase): errors = NotATupleAdmin.check(model=Song) expected = [ checks.Error( - "The value of 'fieldsets[1]['fields']' must be a list or tuple.", + "The value of 'fieldsets[0][1]['fields']' must be a list or tuple.", hint=None, obj=NotATupleAdmin, id='admin.E008', @@ -150,7 +150,7 @@ class SystemChecksTestCase(TestCase): def test_nonfirst_fieldset(self): """ - Tests for a tuple/list within the second fieldsets[2]['fields']. + Tests for a tuple/list for the second fieldset's fields. """ class NotATupleAdmin(admin.ModelAdmin): fieldsets = [ @@ -165,7 +165,7 @@ class SystemChecksTestCase(TestCase): errors = NotATupleAdmin.check(model=Song) expected = [ checks.Error( - "The value of 'fieldsets[1]['fields']' must be a list or tuple.", + "The value of 'fieldsets[1][1]['fields']' must be a list or tuple.", hint=None, obj=NotATupleAdmin, id='admin.E008', |
