From d64f192df188903ea5a1ab8dfd6679e5d52aaf9b Mon Sep 17 00:00:00 2001 From: Stephen Burrows Date: Thu, 15 May 2014 20:12:32 -0700 Subject: Fixed #22628 -- Took initial forms into account when combining FormSet.min_num and FormSet.extra. Forwardport of 79f15ab1ef from stable/1.7.x --- tests/admin_inlines/tests.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests/admin_inlines') diff --git a/tests/admin_inlines/tests.py b/tests/admin_inlines/tests.py index 7025158aab..5d97381f18 100644 --- a/tests/admin_inlines/tests.py +++ b/tests/admin_inlines/tests.py @@ -247,7 +247,6 @@ class TestInline(TestCase): def test_custom_min_num(self): """ Ensure that get_min_num is called and used correctly. - See #22628 - this will change when that's fixed. """ bt_head = BinaryTree.objects.create(name="Tree Head") BinaryTree.objects.create(name="First Child", parent=bt_head) @@ -277,7 +276,7 @@ class TestInline(TestCase): request.user = User(username='super', is_superuser=True) response = modeladmin.changeform_view(request, object_id=str(bt_head.id)) self.assertContains(response, min_forms % 5) - self.assertContains(response, total_forms % 9) + self.assertContains(response, total_forms % 8) def test_inline_nonauto_noneditable_pk(self): response = self.client.get('/admin/admin_inlines/author/add/') -- cgit v1.3