#NEWLINE# @ mock . patch . object ( heatclient , 'Client' ) #NEWLINE# @ mock . patch . object ( clients . OpenStackClients , 'url_for' ) #NEWLINE# @ mock . patch . object ( clients . OpenStackClients , 'auth_url' ) #NEWLINE# def test_clients_heat( self , mock_auth , mock_url , mock_call ) : #NEWLINE# #INDENT# mock_auth . __get__ = mock . Mock ( return_value = 'keystone_url' ) #NEWLINE# con = mock . MagicMock ( ) #NEWLINE# con . tenant = 'b363706f891f48019483f8bd6503c54b' #NEWLINE# con . auth_token = '3bcc3d3a03f44e3d8377f9247b0ad155' #NEWLINE# con . auth_url = 'keystone_url' #NEWLINE# mock_url . return_value = 'url_from_keystone' #NEWLINE# obj = clients . OpenStackClients ( self ) #NEWLINE# obj . _heat = None #NEWLINE# obj . heat ( ) #NEWLINE# mock_call . assert_called_once_with ( '1' , 'url_from_keystone' , username = None , cert_file = None , token = '3bcc3d3a03f44e3d8377f9247b0ad155' , auth_url = 'keystone_url' , ca_file = None , key_file = None , password = None , insecure = False ) #NEWLINE# mock_url . assert_called_once_with ( service_type = 'orchestration' , endpoint_type = 'publicURL' , region_name = 'RegionOne' )