#NEWLINE# def test_commit_offsets_async( mocker , coordinator , offsets ) : #NEWLINE# #INDENT# mocker . patch . object ( coordinator . _client , 'poll' ) #NEWLINE# mocker . patch . object ( coordinator , 'ensure_coordinator_known' ) #NEWLINE# mocker . patch . object ( coordinator , '_send_offset_commit_request' , return_value = Future ( ) . success ( 'fizzbuzz' ) ) #NEWLINE# ret = coordinator . commit_offsets_async ( offsets ) #NEWLINE# assert isinstance ( ret , Future ) #NEWLINE# assert ( mocker . _send_offset_commit_request . call_count == 1 )