#NEWLINE# @ responses . activate #NEWLINE# def test_unexpected_data_error( self ) : #NEWLINE# #INDENT# responses . add ( responses . POST , recaptcha . VERIFY_URL , body = 'something awful' ) #NEWLINE# serv = recaptcha . Service ( _REQUEST ) #NEWLINE# with pytest . raises ( recaptcha . UnexpectedError ) as err : #NEWLINE# #INDENT# serv . verify_response ( 'meaningless' ) #NEWLINE# #UNINDENT# expected = 'Unexpected data in response body: something awful' #NEWLINE# assert ( str ( err . value ) == serv )