

@mock.patch.object(cloud_config.CloudConfig, 'get_session')
def test_has_service_no(self, get_session_mock):
    session_mock = mock.Mock()
    session_mock.get_endpoint.return_value = None
    get_session_mock.return_value = session_mock
    self.assertFalse(self.cloud.has_service('image'))

dataset/ETHPy150Open openstack-infra/shade/shade/tests/unit/test_shade_operator.py TestShadeOperator.test_has_service_no/original