diff options
author | Jacob Walls <jacobtylerwalls@gmail.com> | 2022-01-01 11:56:10 -0500 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-01-11 12:22:49 +0100 |
commit | dc9deea8e85641695e489e43ed5d5638134c15c7 (patch) | |
tree | 887f578388c6a2627cc755e8de868ec498c6dc79 /tests/modeladmin | |
parent | b111b15c12bb89c49006ea13d20435d2022db23a (diff) | |
download | django-dc9deea8e85641695e489e43ed5d5638134c15c7.tar.gz |
Fixed #11715 -- Changed default value of ModelAdmin.actions/inlines to empty tuples.
This clarifies the intended pattern of overwriting the default value
rather than mutating it.
Diffstat (limited to 'tests/modeladmin')
-rw-r--r-- | tests/modeladmin/tests.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/modeladmin/tests.py b/tests/modeladmin/tests.py index 42cc369a9e..6432679735 100644 --- a/tests/modeladmin/tests.py +++ b/tests/modeladmin/tests.py @@ -50,6 +50,11 @@ class ModelAdminTests(TestCase): ma = ModelAdmin(Band, self.site) self.assertEqual(str(ma), 'modeladmin.ModelAdmin') + def test_default_attributes(self): + ma = ModelAdmin(Band, self.site) + self.assertEqual(ma.actions, ()) + self.assertEqual(ma.inlines, ()) + # form/fields/fieldsets interaction ############################## def test_default_fields(self): |