# Path: magnumclient/v1/client.py
# DEFAULT_SERVICE_TYPE = 'container-infra'
# LEGACY_DEFAULT_SERVICE_TYPE = 'container'
# def _load_session(cloud=None, insecure=False, timeout=None, **kwargs):
# def _load_service_type(session,
#                        service_type=None, service_name=None,
#                        interface=None, region_name=None):
# def _load_session_client(session=None, endpoint_override=None, username=None,
#                          project_id=None, project_name=None,
#                          auth_url=None, password=None, auth_type=None,
#                          insecure=None, user_domain_id=None,
#                          user_domain_name=None, project_domain_id=None,
#                          project_domain_name=None, auth_token=None,
#                          timeout=None, service_type=None, service_name=None,
#                          interface=None, region_name=None, api_version=None,
#                          **kwargs):
#     def __init__(self, username=None, api_key=None, project_id=None,
#                  project_name=None, auth_url=None, magnum_url=None,
#                  endpoint_type=None, endpoint_override=None,
#                  service_type=DEFAULT_SERVICE_TYPE,
#                  region_name=None, input_auth_token=None,
#                  session=None, password=None, auth_type='password',
#                  interface=None, service_name=None, insecure=False,
#                  user_domain_id=None, user_domain_name=None,
#                  project_domain_id=None, project_domain_name=None,
#                  auth_token=None, timeout=600, api_version=None,
#                  **kwargs):
# class Client(object):


import testtools
from unittest import mock
from keystoneauth1.exceptions import catalog
from magnumclient.v1 import client
            'project_domain_name': None,
            'auth_token': None,
            'timeout': 600,
        }

    def _load_service_type_kwargs(self):
        return {
            'interface': 'public',
            'region_name': None,
            'service_name': None,
            'service_type': 'container-infra',
        }

    def _session_client_kwargs(self, session):
        kwargs = self._load_service_type_kwargs()
        kwargs['endpoint_override'] = None
        kwargs['session'] = session
        kwargs['api_version'] = None

        return kwargs

    @mock.patch('magnumclient.common.httpclient.SessionClient')
    @mock.patch('magnumclient.v1.client._load_session')
    @mock.patch('magnumclient.v1.client._load_service_type',
                return_value='container-infra')
    def test_init_with_session(self,
                               mock_load_service_type,
                               mock_load_session,
                               mock_http_client):
        session = mock.Mock()

# Path: magnumclient/v1/client.py
# DEFAULT_SERVICE_TYPE = 'container-infra'
# LEGACY_DEFAULT_SERVICE_TYPE = 'container'
# def _load_session(cloud=None, insecure=False, timeout=None, **kwargs):
# def _load_service_type(session,
#                        service_type=None, service_name=None,
#                        interface=None, region_name=None):
# def _load_session_client(session=None, endpoint_override=None, username=None,
#                          project_id=None, project_name=None,
#                          auth_url=None, password=None, auth_type=None,
#                          insecure=None, user_domain_id=None,
#                          user_domain_name=None, project_domain_id=None,
#                          project_domain_name=None, auth_token=None,
#                          timeout=None, service_type=None, service_name=None,
#                          interface=None, region_name=None, api_version=None,
#                          **kwargs):
#     def __init__(self, username=None, api_key=None, project_id=None,
#                  project_name=None, auth_url=None, magnum_url=None,
#                  endpoint_type=None, endpoint_override=None,
#                  service_type=DEFAULT_SERVICE_TYPE,
#                  region_name=None, input_auth_token=None,
#                  session=None, password=None, auth_type='password',
#                  interface=None, service_name=None, insecure=False,
#                  user_domain_id=None, user_domain_name=None,
#                  project_domain_id=None, project_domain_name=None,
#                  auth_token=None, timeout=600, api_version=None,
#                  **kwargs):
# class Client(object):


# Path: magnumclient/tests/v1/test_client.py
import testtools
from unittest import mock
from keystoneauth1.exceptions import catalog
from magnumclient.v1 import client

            'project_domain_name': None,
            'auth_token': None,
            'timeout': 600,
        }

    def _load_service_type_kwargs(self):
        return {
            'interface': 'public',
            'region_name': None,
            'service_name': None,
            'service_type': 'container-infra',
        }

    def _session_client_kwargs(self, session):
        kwargs = self._load_service_type_kwargs()
        kwargs['endpoint_override'] = None
        kwargs['session'] = session
        kwargs['api_version'] = None

        return kwargs

    @mock.patch('magnumclient.common.httpclient.SessionClient')
    @mock.patch('magnumclient.v1.client._load_session')
    @mock.patch('magnumclient.v1.client._load_service_type',
                return_value='container-infra')
    def test_init_with_session(self,
                               mock_load_service_type,
                               mock_load_session,
                               mock_http_client):
        session = mock.Mock()

        client.Client(session=session)