From 79f15ab1ef964c0209c4484ccf62ba458fd582b3 Mon Sep 17 00:00:00 2001 From: Stephen Burrows Date: Thu, 15 May 2014 20:12:32 -0700 Subject: [1.7.x] Fixed #22628 -- Took initial forms into account when combining FormSet.min_num and FormSet.extra. --- tests/generic_inline_admin/tests.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests/generic_inline_admin') diff --git a/tests/generic_inline_admin/tests.py b/tests/generic_inline_admin/tests.py index f08ea05a10..7840ab43d8 100644 --- a/tests/generic_inline_admin/tests.py +++ b/tests/generic_inline_admin/tests.py @@ -203,8 +203,7 @@ class GenericInlineAdminParametersTest(TestCase): def testMinNumParam(self): """ - With extra=3 and min_num=2, there should be six forms. - See #22628 - this will change when that's fixed. + With extra=3 and min_num=2, there should be five forms. """ class MinNumInline(GenericTabularInline): model = Media @@ -219,7 +218,7 @@ class GenericInlineAdminParametersTest(TestCase): request.user = User(username='super', is_superuser=True) response = modeladmin.changeform_view(request, object_id=str(e.pk)) formset = response.context_data['inline_admin_formsets'][0].formset - self.assertEqual(formset.total_form_count(), 6) + self.assertEqual(formset.total_form_count(), 5) self.assertEqual(formset.initial_form_count(), 1) -- cgit v1.3