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:
committed by
Mariusz Felisiak
parent
b111b15c12
commit
dc9deea8e8
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user