# HG changeset patch
# Parent 1967de9eb7e9389fa57e3cd61c7f4e1f7d079f8a

diff --git a/tests/regressiontests/forms/formsets.py b/tests/regressiontests/forms/formsets.py
--- a/tests/regressiontests/forms/formsets.py
+++ b/tests/regressiontests/forms/formsets.py
@@ -53,6 +53,8 @@
 True
 >>> [form.cleaned_data for form in formset.forms]
 [{'votes': 100, 'choice': u'Calexico'}]
+>>> [form.cleaned_data for form in formset.valid_forms]
+[{'votes': 100, 'choice': u'Calexico'}]
 
 If a FormSet was not passed any data, its is_valid method should return False.
 >>> formset = ChoiceFormSet()
@@ -108,6 +110,8 @@
 True
 >>> [form.cleaned_data for form in formset.forms]
 [{'votes': 100, 'choice': u'Calexico'}, {}]
+>>> [form.cleaned_data for form in formset.valid_forms]
+[{'votes': 100, 'choice': u'Calexico'}]
 
 But the second form was blank! Shouldn't we get some errors? No. If we display
 a form as blank, it's ok for it to be submitted as blank. If we fill out even
@@ -190,6 +194,8 @@
 True
 >>> [form.cleaned_data for form in formset.forms]
 [{}, {}, {}]
+>>> [form.cleaned_data for form in formset.valid_forms]
+[]
 
 
 We can just fill out one of the forms.
@@ -211,6 +217,8 @@
 True
 >>> [form.cleaned_data for form in formset.forms]
 [{'votes': 100, 'choice': u'Calexico'}, {}, {}]
+>>> [form.cleaned_data for form in formset.valid_forms]
+[{'votes': 100, 'choice': u'Calexico'}]
 
 
 And once again, if we try to partially complete a form, validation will fail.
@@ -303,6 +311,8 @@
 True
 >>> [form.cleaned_data for form in formset.forms]
 [{'votes': 100, 'DELETE': False, 'choice': u'Calexico'}, {'votes': 900, 'DELETE': True, 'choice': u'Fergie'}, {}]
+>>> [form.cleaned_data for form in formset.valid_forms]
+[{'votes': 100, 'DELETE': False, 'choice': u'Calexico'}]
 >>> [form.cleaned_data for form in formset.deleted_forms]
 [{'votes': 900, 'DELETE': True, 'choice': u'Fergie'}]
 
@@ -332,6 +342,8 @@
 Traceback (most recent call last):
 ...
 AttributeError: 'CheckForm' object has no attribute 'cleaned_data'
+>>> [form.cleaned_data for form in formset.valid_forms]
+[{'field': 200, 'DELETE': False}]
 
 If we remove the deletion flag now we will have our validation back.
 
@@ -404,6 +416,11 @@
 >>> formset = ChoiceFormSet(data, auto_id=False, prefix='choices')
 >>> formset.is_valid()
 True
+>>> for form in formset.valid_forms:
+...    print form.cleaned_data
+{'votes': 500, 'ORDER': 0, 'choice': u'The Decemberists'}
+{'votes': 100, 'ORDER': 1, 'choice': u'Calexico'}
+{'votes': 900, 'ORDER': 2, 'choice': u'Fergie'}
 >>> for form in formset.ordered_forms:
 ...    print form.cleaned_data
 {'votes': 500, 'ORDER': 0, 'choice': u'The Decemberists'}
@@ -434,6 +451,12 @@
 >>> formset = ChoiceFormSet(data, auto_id=False, prefix='choices')
 >>> formset.is_valid()
 True
+>>> for form in formset.valid_forms:
+...    print form.cleaned_data
+{'votes': 100, 'ORDER': 1, 'choice': u'Calexico'}
+{'votes': 900, 'ORDER': 2, 'choice': u'Fergie'}
+{'votes': 500, 'ORDER': None, 'choice': u'The Decemberists'}
+{'votes': 50, 'ORDER': None, 'choice': u'Basia Bulat'}
 >>> for form in formset.ordered_forms:
 ...    print form.cleaned_data
 {'votes': 100, 'ORDER': 1, 'choice': u'Calexico'}
@@ -452,6 +475,8 @@
 >>> formset = ChoiceFormSet(data, auto_id=False, prefix='choices')
 >>> formset.is_valid()
 True
+>>> for form in formset.valid_forms:
+...    print form.cleaned_data
 >>> for form in formset.ordered_forms:
 ...    print form.cleaned_data
 
@@ -513,6 +538,10 @@
 >>> formset = ChoiceFormSet(data, auto_id=False, prefix='choices')
 >>> formset.is_valid()
 True
+>>> for form in formset.valid_forms:
+...    print form.cleaned_data
+{'votes': 500, 'DELETE': False, 'ORDER': 0, 'choice': u'The Decemberists'}
+{'votes': 100, 'DELETE': False, 'ORDER': 1, 'choice': u'Calexico'}
 >>> for form in formset.ordered_forms:
 ...    print form.cleaned_data
 {'votes': 500, 'DELETE': False, 'ORDER': 0, 'choice': u'The Decemberists'}
@@ -546,6 +575,8 @@
 Traceback (most recent call last):
 ...
 AttributeError: 'Person' object has no attribute 'cleaned_data'
+>>> [form.cleaned_data for form in p.valid_forms]
+[{'DELETE': False, 'name': u'John Smith', 'ORDER': None}]
 
 # FormSet clean hook ##########################################################
 
