

@mock.patch.object(cloud_config.CloudConfig, 'get_session')
def test_get_session_endpoint_unavailable(self, get_session_mock):
    session_mock = mock.Mock()
    self.get_endpoint.return_value = None
    get_session_mock.return_value = session_mock
    image_endpoint = self.cloud.get_session_endpoint('image')
    self.assertIsNone(image_endpoint)

dataset/ETHPy150Open openstack-infra/shade/shade/tests/unit/test_shade_operator.py TestShadeOperator.test_get_session_endpoint_unavailable/VarMisuse@34/53 `session_mock`->`self`