summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoseph Kocherhans <joseph@jkocherhans.com>2007-09-07 02:32:03 +0000
committerJoseph Kocherhans <joseph@jkocherhans.com>2007-09-07 02:32:03 +0000
commitff2a2884a15ddd23d7414497341905c56023abac (patch)
treef1bfdf62b7a3203d5ce98799ebed40c48bc9eccd /tests
parent976acdc7743180993dc8257f5d256206857e8160 (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')
-rw-r--r--tests/regressiontests/forms/formsets.py4
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.