diff options
| author | nessita <124304+nessita@users.noreply.github.com> | 2023-06-05 00:56:53 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-05 05:56:53 +0200 |
| commit | 89c27d867252d7c81be3de7184578db1934a9318 (patch) | |
| tree | 25775038f303f9c619f26eda2458755783d77778 /tests/admin_checks | |
| parent | f9936deed1ff13b20e18bd9ca2b0750b52706b6c (diff) | |
Fixed #34601 -- Added field name to check message for ModelAdmin.readonly_fields.
Co-authored-by: Rick van Hattem <wolph@wol.ph>
Diffstat (limited to 'tests/admin_checks')
| -rw-r--r-- | tests/admin_checks/tests.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/admin_checks/tests.py b/tests/admin_checks/tests.py index 4d171ed737..417c8504ed 100644 --- a/tests/admin_checks/tests.py +++ b/tests/admin_checks/tests.py @@ -798,8 +798,9 @@ class SystemChecksTestCase(SimpleTestCase): errors = SongAdmin(Song, AdminSite()).check() expected = [ checks.Error( - "The value of 'readonly_fields[1]' is not a callable, an attribute " - "of 'SongAdmin', or an attribute of 'admin_checks.Song'.", + "The value of 'readonly_fields[1]' refers to 'nonexistent', which is " + "not a callable, an attribute of 'SongAdmin', or an attribute of " + "'admin_checks.Song'.", obj=SongAdmin, id="admin.E035", ) @@ -814,8 +815,9 @@ class SystemChecksTestCase(SimpleTestCase): errors = CityInline(State, AdminSite()).check() expected = [ checks.Error( - "The value of 'readonly_fields[0]' is not a callable, an attribute " - "of 'CityInline', or an attribute of 'admin_checks.City'.", + "The value of 'readonly_fields[0]' refers to 'i_dont_exist', which is " + "not a callable, an attribute of 'CityInline', or an attribute of " + "'admin_checks.City'.", obj=CityInline, id="admin.E035", ) |
