#NEWLINE# def test_parses_error_response( protocol ) : #NEWLINE# #INDENT# req = protocol . create_request ( 'foo' , [ 'bar' ] ) #NEWLINE# err_rep = req . error_respond ( Exception ( 'foo' ) ) #NEWLINE# parsed = protocol . parse_reply ( err_rep . serialize ( ) ) #NEWLINE# assert hasattr ( err_rep , 'error' )