diff options
Diffstat (limited to 'tests/admin_checks')
| -rw-r--r-- | tests/admin_checks/tests.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/admin_checks/tests.py b/tests/admin_checks/tests.py index 5744dc1b39..139b6dec59 100644 --- a/tests/admin_checks/tests.py +++ b/tests/admin_checks/tests.py @@ -692,6 +692,7 @@ class SystemChecksTestCase(SimpleTestCase): self.assertEqual(errors, []) def test_readonly_on_method(self): + @admin.display def my_function(obj): pass @@ -705,6 +706,7 @@ class SystemChecksTestCase(SimpleTestCase): class SongAdmin(admin.ModelAdmin): readonly_fields = ("readonly_method_on_modeladmin",) + @admin.display def readonly_method_on_modeladmin(self, obj): pass @@ -717,6 +719,7 @@ class SystemChecksTestCase(SimpleTestCase): def __getattr__(self, item): if item == "dynamic_method": + @admin.display def method(obj): pass return method @@ -777,6 +780,7 @@ class SystemChecksTestCase(SimpleTestCase): def test_extra(self): class SongAdmin(admin.ModelAdmin): + @admin.display def awesome_song(self, instance): if instance.title == "Born to Run": return "Best Ever!" |
