#NEWLINE# def test_validate_max_ignores_forms_marked_for_deletion( self ) : #NEWLINE# #INDENT# class CheckForm ( Form ) : #NEWLINE# #INDENT# field = IntegerField ( ) #NEWLINE# #UNINDENT# data = { #NEWLINE# #INDENT# 'check-TOTAL_FORMS' : '2' , #NEWLINE# 'check-INITIAL_FORMS' : '0' , #NEWLINE# 'check-MAX_NUM_FORMS' : '1' , #NEWLINE# 'check-0-field' : '200' , #NEWLINE# 'check-0-DELETE' : '' , #NEWLINE# 'check-1-field' : '50' , #NEWLINE# 'check-1-DELETE' : 'on' , #NEWLINE# #UNINDENT# } #NEWLINE# CheckFormSet = formset_factory ( CheckForm , max_num = 1 , validate_max = True , can_delete = True ) #NEWLINE# formset = CheckFormSet ( data , prefix = 'check' ) #NEWLINE# self . assertTrue ( formset . is_valid ( ) )