

@mock.patch.object(messaging, 'TransportURL')
def test_get_transport_url(self, mock_url):
    conf = mock.Mock()
    rpc.CONF = conf
    conf.parse.return_value = 'foo'
    url = rpc.get_transport_url(url_str='bar')
    self.assertEqual('foo', url)
    mock_url.parse.assert_called_once_with(conf, 'bar', rpc.TRANSPORT_ALIASES)

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/test_rpc.py TestRPC.test_get_transport_url/VarMisuse@38/47 `mock_url`->`conf`