1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

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.
This commit is contained in:
Jacob Walls
2022-01-01 11:56:10 -05:00
committed by Mariusz Felisiak
parent b111b15c12
commit dc9deea8e8
3 changed files with 11 additions and 2 deletions

View File

@@ -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):