

@mock.patch('logging.Logger.warning')
@mock.patch('keystoneclient.v3.client.Client')
def test_mistral_url_https_bad_insecure(self, keystone_client_mock, log_warning_mock):
    (fd, path) = tempfile.mkstemp(suffix='.pem')
    keystone_client_instance = keystone_client_mock.return_value
    keystone_client_instance.auth_token = str(uuid.uuid4())
    keystone_client_instance.project_id = str(uuid.uuid4())
    keystone_client_instance.user_id = str(uuid.uuid4())
    try:
        client.client(mistral_url=MISTRAL_HTTPS_URL, username='mistral', project_name='mistral', auth_url=AUTH_HTTP_URL, cacert=path, insecure=True)
    finally:
        os.close(fd)
        os.unlink(path)
    keystone_client_instance.assertTrue(log_warning_mock.called)

dataset/ETHPy150Open openstack/python-mistralclient/mistralclient/tests/unit/test_client.py BaseClientTests.test_mistral_url_https_bad_insecure/VarMisuse@143/235 `self`->`keystone_client_instance`