# Path: mistralclient/api/httpclient.py
# AUTH_TOKEN = 'auth_token'
# SESSION = 'session'
# CACERT = 'cacert'
# CERT_FILE = 'cert'
# CERT_KEY = 'key'
# INSECURE = 'insecure'
# PROJECT_ID = 'project_id'
# USER_ID = 'user_id'
# REGION_NAME = 'region_name'
# TARGET_AUTH_TOKEN = 'target_auth_token'
# TARGET_SESSION = 'target_session'
# TARGET_AUTH_URI = 'target_auth_url'
# TARGET_PROJECT_ID = 'target_project_id'
# TARGET_USER_ID = 'target_user_id'
# TARGET_INSECURE = 'target_insecure'
# TARGET_SERVICE_CATALOG = 'target_service_catalog'
# TARGET_REGION_NAME = 'target_region_name'
# TARGET_USER_DOMAIN_NAME = 'target_user_domain_name'
# TARGET_PROJECT_DOMAIN_NAME = 'target_project_domain_name'
# LOG = logging.getLogger(__name__)
# def log_request(func):
#     def decorator(self, *args, **kwargs):
#     def __init__(self, base_url, **kwargs):
#     def get(self, url, headers=None):
#     def post(self, url, body, headers=None):
#     def put(self, url, body, headers=None):
#     def delete(self, url, headers=None):
#     def _get_request_options(self, method, headers):
#     def _update_headers(self, headers):
# class HTTPClient(object):
# 
# Path: mistralclient/tests/unit/base.py
# class BaseClientTest(base.BaseTestCase):
# class BaseCommandTest(base.BaseTestCase):
#     def setUp(self):
#     def setUp(self):
#     def call(self, command, app_args=(), prog_name=''):


import base64
import copy
import osprofiler.profiler
from unittest import mock
from urllib import parse as urlparse
from oslo_utils import uuidutils
from osprofiler import _utils as osprofiler_utils
from mistralclient.api import httpclient
from mistralclient.tests.unit import base
API_BASE_URL = 'http://localhost:8989/v2'
API_URL = '/executions'

EXPECTED_URL = API_BASE_URL + API_URL

AUTH_TOKEN = uuidutils.generate_uuid()
PROJECT_ID = uuidutils.generate_uuid()
USER_ID = uuidutils.generate_uuid()
REGION_NAME = 'fake_region'
PROFILER_HMAC_KEY = 'SECRET_HMAC_KEY'
PROFILER_TRACE_ID = uuidutils.generate_uuid()

EXPECTED_AUTH_HEADERS = {
    'X-Auth-Token': AUTH_TOKEN,
    'X-Project-Id': PROJECT_ID,
    'X-User-Id': USER_ID,
    'X-Region-Name': REGION_NAME
}

EXPECTED_REQ_OPTIONS = {
    'headers': EXPECTED_AUTH_HEADERS
}

EXPECTED_BODY = {
    'k1': 'abc',
    'k2': 123,
    'k3': True
}



# Path: mistralclient/api/httpclient.py
# AUTH_TOKEN = 'auth_token'
# SESSION = 'session'
# CACERT = 'cacert'
# CERT_FILE = 'cert'
# CERT_KEY = 'key'
# INSECURE = 'insecure'
# PROJECT_ID = 'project_id'
# USER_ID = 'user_id'
# REGION_NAME = 'region_name'
# TARGET_AUTH_TOKEN = 'target_auth_token'
# TARGET_SESSION = 'target_session'
# TARGET_AUTH_URI = 'target_auth_url'
# TARGET_PROJECT_ID = 'target_project_id'
# TARGET_USER_ID = 'target_user_id'
# TARGET_INSECURE = 'target_insecure'
# TARGET_SERVICE_CATALOG = 'target_service_catalog'
# TARGET_REGION_NAME = 'target_region_name'
# TARGET_USER_DOMAIN_NAME = 'target_user_domain_name'
# TARGET_PROJECT_DOMAIN_NAME = 'target_project_domain_name'
# LOG = logging.getLogger(__name__)
# def log_request(func):
#     def decorator(self, *args, **kwargs):
#     def __init__(self, base_url, **kwargs):
#     def get(self, url, headers=None):
#     def post(self, url, body, headers=None):
#     def put(self, url, body, headers=None):
#     def delete(self, url, headers=None):
#     def _get_request_options(self, method, headers):
#     def _update_headers(self, headers):
# class HTTPClient(object):
# 
# Path: mistralclient/tests/unit/base.py
# class BaseClientTest(base.BaseTestCase):
# class BaseCommandTest(base.BaseTestCase):
#     def setUp(self):
#     def setUp(self):
#     def call(self, command, app_args=(), prog_name=''):


# Path: mistralclient/tests/unit/test_httpclient.py
import base64
import copy
import osprofiler.profiler
from unittest import mock
from urllib import parse as urlparse
from oslo_utils import uuidutils
from osprofiler import _utils as osprofiler_utils
from mistralclient.api import httpclient
from mistralclient.tests.unit import base

API_BASE_URL = 'http://localhost:8989/v2'
API_URL = '/executions'

EXPECTED_URL = API_BASE_URL + API_URL

AUTH_TOKEN = uuidutils.generate_uuid()
PROJECT_ID = uuidutils.generate_uuid()
USER_ID = uuidutils.generate_uuid()
REGION_NAME = 'fake_region'
PROFILER_HMAC_KEY = 'SECRET_HMAC_KEY'
PROFILER_TRACE_ID = uuidutils.generate_uuid()

EXPECTED_AUTH_HEADERS = {
    'X-Auth-Token': AUTH_TOKEN,
    'X-Project-Id': PROJECT_ID,
    'X-User-Id': USER_ID,
    'X-Region-Name': REGION_NAME
}

EXPECTED_REQ_OPTIONS = {
    'headers': EXPECTED_AUTH_HEADERS
}

EXPECTED_BODY = {
    'k1': 'abc',
    'k2': 123,
    'k3': True
}



class HTTPClientTest(base.BaseClientTest):