#NEWLINE# def test_callback( self ) : #NEWLINE# #INDENT# session = self . make_session ( ) #NEWLINE# rf = self . make_response_future ( session ) #NEWLINE# rf . send_request ( ) #NEWLINE# callback = Mock ( ) #NEWLINE# expected_result = [ { #NEWLINE# #INDENT# 'col' : 'val' , #NEWLINE# #UNINDENT# } ] #NEWLINE# arg = 'positional' #NEWLINE# kwargs = { #NEWLINE# #INDENT# 'one' : 1 , #NEWLINE# 'two' : 2 , #NEWLINE# #UNINDENT# } #NEWLINE# rf . add_callback ( callback , arg , ** kwargs ) #NEWLINE# rf . _set_result ( self . make_mock_response ( expected_result ) ) #NEWLINE# result = rf . result ( ) #NEWLINE# self . assertEqual ( result , expected_result ) #NEWLINE# callback . assert_called_once_with ( result , arg , ** kwargs ) #NEWLINE# rf . add_callback ( self . assertEqual , [ { #NEWLINE# #INDENT# 'col' : 'val' , #NEWLINE# #UNINDENT# } ] )