

def testMaxNumParam(self):
    '\n        With extra=5 and max_num=2, there should be only 2 forms.\n        '
    e = self._create_object(EpisodeMaxNum)
    inline_form_data = '<input type="hidden" name="generic_inline_admin-media-content_type-object_id-TOTAL_FORMS" value="2" id="id_generic_inline_admin-media-content_type-object_id-TOTAL_FORMS" /><input type="hidden" name="generic_inline_admin-media-content_type-object_id-INITIAL_FORMS" value="1" id="id_generic_inline_admin-media-content_type-object_id-INITIAL_FORMS" />'
    response = self.client.get(('/generic_inline_admin/admin/generic_inline_admin/episodemaxnum/%s/' % e.pk))
    formset = response.context['inline_admin_formsets'][0].formset
    self.assertEqual(formset.total_form_count(), 2)
    self.assertEqual(formset.initial_form_count(), 1)

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/tests/regressiontests/generic_inline_admin/tests.py GenericInlineAdminParametersTest.testMaxNumParam/original