hvac/tests/utils.py
def create_client(**kwargs):
    """Small helper to instantiate a :py:class:`hvac.v1.Client` class with the appropriate parameters for the test env.

    :param kwargs: Dictionary of additional keyword arguments to pass through to the Client instance being created.
    :type kwargs: dict
    :return: Instantiated :py:class:`hvac.v1.Client` class.
    :rtype: hvac.v1.Client
    """
    client_cert_path = get_test_data_path('client-cert.pem')
    client_key_path = get_test_data_path('client-key.pem')
    server_cert_path = get_test_data_path('server-cert.pem')

    return Client(
        url='https://localhost:8200',
        cert=(client_cert_path, client_key_path),
        verify=server_cert_path,
        **kwargs
    )
Small helper to instantiate a :py:class:`hvac.v1.Client` class with the appropriate parameters for the test env.

    :param kwargs: Dictionary of additional keyword arguments to pass through to the Client instance being created.
    :type kwargs: dict
    :return: Instantiated :py:class:`hvac.v1.Client` class.
    :rtype: hvac.v1.Client
    
Small helper to instantiate a :py:class:`hvac.v1.Client` class with the appropriate parameters for the test env.
Small helper to instantiate a : py : class : ` hvac . v1 . Client ` class with the appropriate parameters for the test env .
def create_client(**kwargs):
    client_cert_path = get_test_data_path('client-cert.pem')
    client_key_path = get_test_data_path('client-key.pem')
    server_cert_path = get_test_data_path('server-cert.pem')
    return Client(
        url='https://localhost:8200',
        cert=(client_cert_path, client_key_path),
        verify=server_cert_path,
        **kwargs
    )
def create_client ( ** kwargs ) : client_cert_path = get_test_data_path ( 'client-cert.pem' ) client_key_path = get_test_data_path ( 'client-key.pem' ) server_cert_path = get_test_data_path ( 'server-cert.pem' ) return Client ( url = 'https://localhost:8200' , cert = ( client_cert_path , client_key_path ) , verify = server_cert_path , ** kwargs )
Small helper to instantiate a :py:class:`hvac.v1.Client` class with the appropriate parameters for the test env.
Small helper to instantiate a : py : class : ` hvac . v1 . Client ` class with the appropriate parameters for the test env .
"""Small helper to instantiate a :py:class:`hvac.v1.Client` class with the appropriate parameters for the test env.

    :param kwargs: Dictionary of additional keyword arguments to pass through to the Client instance being created.
    :type kwargs: dict
    :return: Instantiated :py:class:`hvac.v1.Client` class.
    :rtype: hvac.v1.Client
    """
Instantiated :py:class:`hvac.v1.Client` class.
Instantiated : py : class : ` hvac . v1 . Client ` class .
hvac.v1.Client
kwargs
Dictionary of additional keyword arguments to pass through to the Client instance being created.
Dictionary of additional keyword arguments to pass through to the Client instance being created .