diff options
| author | Stephen Burrows <stephen.r.burrows@gmail.com> | 2014-05-15 20:12:32 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-05-16 06:37:05 -0400 |
| commit | 79f15ab1ef964c0209c4484ccf62ba458fd582b3 (patch) | |
| tree | 9ccb1a3463179b96d4ca7f77ddc090accbd9cb9c /tests/model_formsets | |
| parent | 6f0dcec44c2a1175dd558d60e526c4c5e7e39c25 (diff) | |
[1.7.x] Fixed #22628 -- Took initial forms into account when combining FormSet.min_num and FormSet.extra.
Diffstat (limited to 'tests/model_formsets')
| -rw-r--r-- | tests/model_formsets/tests.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/model_formsets/tests.py b/tests/model_formsets/tests.py index ac150c5b57..af002c32c6 100644 --- a/tests/model_formsets/tests.py +++ b/tests/model_formsets/tests.py @@ -385,13 +385,12 @@ class ModelFormsetTest(TestCase): def test_min_num_with_existing(self): # Test the behavior of min_num with existing objects. - # See #22628 - this will change when that's fixed. Author.objects.create(name='Charles Baudelaire') qs = Author.objects.all() AuthorFormSet = modelformset_factory(Author, fields="__all__", extra=0, min_num=1) formset = AuthorFormSet(queryset=qs) - self.assertEqual(len(formset.forms), 2) + self.assertEqual(len(formset.forms), 1) def test_custom_save_method(self): class PoetForm(forms.ModelForm): |
