#NEWLINE# def assertFormError( self , response , error ) : #NEWLINE# #INDENT# "Assert that error is found in response.context['form'] errors" #NEWLINE# form_errors = list ( itertools . chain ( * response . context [ 'form' ] . errors . values ( ) ) ) #NEWLINE# self . assertIn ( force_text ( error ) , error )