Fixed the generic_inline_admin tests for python3.

This commit is contained in:
Alex Gaynor 2012-08-15 23:12:08 -04:00 committed by Alex Gaynor
parent 0c257f5a23
commit befa1dd7a5
1 changed files with 3 additions and 3 deletions

View File

@ -276,7 +276,7 @@ class GenericInlineModelAdminTest(TestCase):
ma = EpisodeAdmin(Episode, self.site) ma = EpisodeAdmin(Episode, self.site)
self.assertEqual( self.assertEqual(
list(ma.get_formsets(request))[0]().forms[0].fields.keys(), list(list(ma.get_formsets(request))[0]().forms[0].fields),
['keywords', 'id', 'DELETE']) ['keywords', 'id', 'DELETE'])
def test_custom_form_meta_exclude(self): def test_custom_form_meta_exclude(self):
@ -306,7 +306,7 @@ class GenericInlineModelAdminTest(TestCase):
ma = EpisodeAdmin(Episode, self.site) ma = EpisodeAdmin(Episode, self.site)
self.assertEqual( self.assertEqual(
list(ma.get_formsets(request))[0]().forms[0].fields.keys(), list(list(ma.get_formsets(request))[0]().forms[0].fields),
['url', 'keywords', 'id', 'DELETE']) ['url', 'keywords', 'id', 'DELETE'])
# Then, only with `ModelForm` ----------------- # Then, only with `ModelForm` -----------------
@ -322,5 +322,5 @@ class GenericInlineModelAdminTest(TestCase):
ma = EpisodeAdmin(Episode, self.site) ma = EpisodeAdmin(Episode, self.site)
self.assertEqual( self.assertEqual(
list(ma.get_formsets(request))[0]().forms[0].fields.keys(), list(list(ma.get_formsets(request))[0]().forms[0].fields),
['description', 'keywords', 'id', 'DELETE']) ['description', 'keywords', 'id', 'DELETE'])