Ejemplo n.º 1
0
 def test_inheritance(self):
     """ If modeladmin is inherited from another customized modeladmin,
     MassAdmin get overriding from all of them.
     """
     ma = MassAdmin(InheritedAdminModel, admin.site)
     self.assertEqual(ma.raw_id_fields, InheritedAdmin.raw_id_fields)
     self.assertEqual(ma.readonly_fields, BaseAdmin.readonly_fields)
Ejemplo n.º 2
0
 def test_custom_from(self):
     """ If form is overridden in ModelAdmin, it should be overridden in
     MassAdmin too.
     """
     ma = MassAdmin(CustomAdminModel, admin.site)
     self.assertEqual(ma.form, CustomAdminForm)