#NEWLINE# def test_send_offset_fetch_request_failure( patched_coord , partitions ) : #NEWLINE# #INDENT# _f = Future ( ) #NEWLINE# patched_coord . _client . send . return_value = _f #NEWLINE# future = patched_coord . _send_offset_fetch_request ( partitions ) #NEWLINE# ( ( node , request ) , _ ) = patched_coord . _client . send . call_args #NEWLINE# error = Exception ( ) #NEWLINE# _f . failure ( error ) #NEWLINE# patched_coord . _failed_request . assert_called_with ( 0 , request , future , _f ) #NEWLINE# assert future . failed ( ) #NEWLINE# assert ( future . exception is error )