예제 #1
0
 def test_name_not_found(self):
     modeladmin = IntsAdmin(IntModel, admin.site)
     result = modeladmin._get_field_name('foo')
     self.assertEqual(result, 'foo')
예제 #2
0
 def test_name_not_found(self):
     modeladmin = IntsAdmin(IntModel, admin.site)
     result = modeladmin._get_field_name('foo')
     self.assertEqual(result, 'foo')
예제 #3
0
 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')
예제 #4
0
 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')