diff options
| author | Joseph Kocherhans <joseph@jkocherhans.com> | 2007-09-07 02:32:03 +0000 |
|---|---|---|
| committer | Joseph Kocherhans <joseph@jkocherhans.com> | 2007-09-07 02:32:03 +0000 |
| commit | ff2a2884a15ddd23d7414497341905c56023abac (patch) | |
| tree | f1bfdf62b7a3203d5ce98799ebed40c48bc9eccd /tests/regressiontests/forms | |
| parent | 976acdc7743180993dc8257f5d256206857e8160 (diff) | |
Fixed #4867. FormSet.is_valid() now returns False when the FormSet is not bound. Thanks John Shaffer.
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@6052 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/forms')
| -rw-r--r-- | tests/regressiontests/forms/formsets.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/regressiontests/forms/formsets.py b/tests/regressiontests/forms/formsets.py index 1c4f3d91b8..95dc8e4a36 100644 --- a/tests/regressiontests/forms/formsets.py +++ b/tests/regressiontests/forms/formsets.py @@ -48,6 +48,10 @@ True >>> formset.cleaned_data [{'votes': 100, 'choice': u'Calexico'}] +If a FormSet was not passed any data, its is_valid method should return False. +>>> formset = ChoiceFormSet() +>>> formset.is_valid() +False FormSet instances can also have an error attribute if validation failed for any of the forms. |
