#NEWLINE# def _get_ports_for_remote_address_cache_hit_helper( self ) : #NEWLINE# #INDENT# remote_address = 'remote_address' #NEWLINE# networks = ( 'net1' , 'net2' ) #NEWLINE# mock_get_ports = self . handler . plugin_rpc . get_ports #NEWLINE# mock_get_ports . return_value = [ { #NEWLINE# #INDENT# 'network_id' : 'net1' , #NEWLINE# 'something' : 42 , #NEWLINE# #UNINDENT# } ] #NEWLINE# self . handler . _get_ports_for_remote_address ( remote_address , networks ) #NEWLINE# mock_get_ports . assert_called_once_with ( mock . ANY , { #NEWLINE# #INDENT# 'network_id' : networks , #NEWLINE# 'fixed_ips' : { #NEWLINE# #INDENT# 'ip_address' : [ remote_address ] , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( 1 , mock_get_ports . call_count ) #NEWLINE# self . handler . _get_ports_for_remote_address ( remote_address , networks )