def test_name_not_found(self): modeladmin = IntsAdmin(IntModel, admin.site) result = modeladmin._get_field_name('foo') self.assertEqual(result, 'foo')
def test_get_from_admin_method(self): modeladmin = IntsAdmin(IntModel, admin.site) result = modeladmin._get_field_name('as_float_from_admin') self.assertEqual(result, 'as_float_from_admin') result = modeladmin._get_field_name('as_float_described') self.assertEqual(result, 'Description')