1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

[1.7.x] Fixed #22628 -- Took initial forms into account when combining FormSet.min_num and FormSet.extra.

This commit is contained in:
Stephen Burrows
2014-05-15 20:12:32 -07:00
committed by Tim Graham
parent 6f0dcec44c
commit 79f15ab1ef
5 changed files with 13 additions and 12 deletions

View File

@@ -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/')