#NEWLINE# def test_invalid_subform( self ) : #NEWLINE# #INDENT# in_data = copy . deepcopy ( self . valid_data ) #NEWLINE# in_data [ 'sub1' ] [ 'select_choices' ] = 'X' #NEWLINE# in_data [ 'sub1' ] [ 'radio_choices' ] = 'Y' #NEWLINE# bound_form = DummyForm ( data = in_data ) #NEWLINE# self . assertTrue ( bound_form . is_bound ) #NEWLINE# self . assertFalse ( bound_form . is_valid ( ) ) #NEWLINE# self . assertTrue ( bound_form . errors . pop ( 'sub1.select_choices' ) ) #NEWLINE# self . assertTrue ( bound_form . errors . pop ( 'sub1.radio_choices' ) ) #NEWLINE# self . assertFalse ( bound_form . errors )