

@mock.patch.object(cloud_config.CloudConfig, 'get_session')
def test_get_session_endpoint_session(self, get_session_mock):
    session_mock = mock.Mock()
    session_mock.get_endpoint.return_value = 'http://fake.url'
    get_session_mock.return_value = session_mock
    self.assertEqual('http://fake.url', session_mock.cloud.get_session_endpoint('image'))

dataset/ETHPy150Open openstack-infra/shade/shade/tests/unit/test_shade_operator.py TestShadeOperator.test_get_session_endpoint_session/VarMisuse@54/95 `self`->`session_mock`