def test_TethysExtensionAdmin(self): expected_readonly_fields = ('package', 'name', 'description') expected_fields = ('package', 'name', 'description', 'enabled') ret = TethysExtensionAdmin(mock.MagicMock(), mock.MagicMock()) self.assertEquals(expected_readonly_fields, ret.readonly_fields) self.assertEquals(expected_fields, ret.fields)
def test_TethysExtensionAdmin_has_add_permission(self): ret = TethysExtensionAdmin(mock.MagicMock(), mock.MagicMock()) self.assertFalse(ret.has_add_permission(mock.MagicMock()))