mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #25206 -- Fixed error message when checking a ModelAdmin fieldset's fields.
This commit is contained in:
committed by
Tim Graham
parent
a6acfc3183
commit
8972818289
@@ -125,7 +125,7 @@ class SystemChecksTestCase(SimpleTestCase):
|
||||
|
||||
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"]
|
||||
@@ -139,7 +139,7 @@ class SystemChecksTestCase(SimpleTestCase):
|
||||
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',
|
||||
@@ -149,7 +149,7 @@ class SystemChecksTestCase(SimpleTestCase):
|
||||
|
||||
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 = [
|
||||
@@ -164,7 +164,7 @@ class SystemChecksTestCase(SimpleTestCase):
|
||||
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',
|
||||
|
||||
Reference in New Issue
Block a user