#NEWLINE# def test_formset_total_error_count( self ) : #NEWLINE# #INDENT# 'A valid formset should have 0 total errors.' #NEWLINE# data = [ ( [ ( 'Calexico' , '100' ) ] , 0 ) , ( [ ( 'Calexico' , '' ) ] , 1 ) , ( [ ( '' , 'invalid' ) ] , 2 ) , ( [ ( 'Calexico' , '100' ) , ( 'Calexico' , '' ) ] , 1 ) , ( [ ( 'Calexico' , '' ) , ( 'Calexico' , '' ) ] , 2 ) ] #NEWLINE# for ( formset_data , expected_error_count ) in data : #NEWLINE# #INDENT# formset = self . make_choiceformset ( formset_data ) #NEWLINE# self . assertEqual ( formset . total_error_count ( ) , expected_error_count )