From dc9deea8e85641695e489e43ed5d5638134c15c7 Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Sat, 1 Jan 2022 11:56:10 -0500 Subject: 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. --- tests/modeladmin/tests.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/modeladmin') 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): -- cgit v1.2.1