mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Refs #24121 -- Added __repr__() to AdminSite, DefaultAdminSite, and ModelAdmin.
Thanks tlebrize for the initial patch.
This commit is contained in:
committed by
Mariusz Felisiak
parent
fa35c8bdbc
commit
e4da365436
@@ -722,6 +722,13 @@ class ModelAdminTests(TestCase):
|
||||
self.assertEqual(perms_needed, {'band'})
|
||||
self.assertEqual(protected, [])
|
||||
|
||||
def test_modeladmin_repr(self):
|
||||
ma = ModelAdmin(Band, self.site)
|
||||
self.assertEqual(
|
||||
repr(ma),
|
||||
"<ModelAdmin: model=Band site=AdminSite(name='admin')>",
|
||||
)
|
||||
|
||||
|
||||
class ModelAdminPermissionTests(SimpleTestCase):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user