diff --git a/tests/regressiontests/generic_inline_admin/tests.py b/tests/regressiontests/generic_inline_admin/tests.py index 83542d1528..75f3e4aaae 100644 --- a/tests/regressiontests/generic_inline_admin/tests.py +++ b/tests/regressiontests/generic_inline_admin/tests.py @@ -89,22 +89,22 @@ class GenericAdminViewTest(TestCase): # Works with no queryset formset = EpisodeMediaFormSet(instance=e) self.assertEquals(len(formset.forms), 5) - self.assertEquals(formset.forms[0].as_p(), '

') - self.assertEquals(formset.forms[1].as_p(), '

') + self.assertEquals(formset.forms[0].as_p(), '

' % self.mp3_media_pk) + self.assertEquals(formset.forms[1].as_p(), '

' % self.png_media_pk) self.assertEquals(formset.forms[2].as_p(), '

') # A queryset can be used to alter display ordering formset = EpisodeMediaFormSet(instance=e, queryset=Media.objects.order_by('url')) self.assertEquals(len(formset.forms), 5) - self.assertEquals(formset.forms[0].as_p(), '

') - self.assertEquals(formset.forms[1].as_p(), '

') + self.assertEquals(formset.forms[0].as_p(), '

' % self.png_media_pk) + self.assertEquals(formset.forms[1].as_p(), '

' % self.mp3_media_pk) self.assertEquals(formset.forms[2].as_p(), '

') # Works with a queryset that omits items formset = EpisodeMediaFormSet(instance=e, queryset=Media.objects.filter(url__endswith=".png")) self.assertEquals(len(formset.forms), 4) - self.assertEquals(formset.forms[0].as_p(), '

') + self.assertEquals(formset.forms[0].as_p(), '

' % self.png_media_pk) self.assertEquals(formset.forms[1].as_p(), '

')