

@mock.patch('keystoneclient.v3.client.Client')
@mock.patch('mistralclient.api.httpclient.HTTPClient')
def test_mistral_url_https_insecure(self, mock, keystone_client_mock):
    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())
    expected_args = (MISTRAL_HTTPS_URL, keystone_client_instance.auth_token, keystone_client_instance.project_id, keystone_client_instance.user_id)
    expected_kwargs = {
        'cacert': None,
        'insecure': True,
    }
    client.client(mistral_url=MISTRAL_HTTPS_URL, username='mistral', project_name='mistral', auth_url=AUTH_HTTP_URL, cacert=None, insecure=True)
    self.assertTrue(mock.called)
    self.assertEqual(mock.call_args[0], expected_args)
    self.assertDictEqual(mock.call_args[1], expected_kwargs)

dataset/ETHPy150Open openstack/python-mistralclient/mistralclient/tests/unit/test_client.py BaseClientTests.test_mistral_url_https_insecure/original