tests Package

data Module

test_checks Module

class leap.eip.tests.test_checks.EIPCheckTest(methodName='runTest')

Bases: leap.testing.basetest.BaseLeapTest

maxDiff = None
provider = 'testprovider.example.org'
setUp()
tearDown()
test_check_complete_eip_config()
test_check_default_eipconfig()
test_check_is_there_default_provider()
test_checker_should_actually_call_all_tests()
test_checker_should_implement_check_methods()
test_fetch_definition()
test_fetch_eip_service_config()
class leap.eip.tests.test_checks.NoLogRequestHandler
log_message(*args)
read(n=None)
class leap.eip.tests.test_checks.ProviderCertCheckerHTTPSTests(methodName='runTest')

Bases: leap.testing.https_server.BaseHTTPSServerTestCase, leap.testing.basetest.BaseLeapTest

provider = 'testprovider.example.org'
class request_handler(request, client_address, server)

Bases: leap.eip.tests.test_checks.NoLogRequestHandler, BaseHTTPServer.BaseHTTPRequestHandler

do_GET()
responses = {'/client.cert': ['-----BEGIN CERTIFICATE-----', '-----END CERTIFICATE-----'], '/badclient.cert': ['BADCERT'], '/': ['OK', '']}
ProviderCertCheckerHTTPSTests.test_bad_validity_certs()
ProviderCertCheckerHTTPSTests.test_check_new_cert_needed()
ProviderCertCheckerHTTPSTests.test_download_new_client_cert(test_item)
ProviderCertCheckerHTTPSTests.test_is_cert_valid()
ProviderCertCheckerHTTPSTests.test_is_https_working()
class leap.eip.tests.test_checks.ProviderCertCheckerTest(methodName='runTest')

Bases: leap.testing.basetest.BaseLeapTest

provider = 'testprovider.example.org'
setUp()
tearDown()
test_checker_should_actually_call_all_tests()
test_checker_should_implement_check_methods()
test_is_there_provider_ca(test_item)

test_config Module

class leap.eip.tests.test_config.EIPConfigTest(methodName='runTest')

Bases: leap.testing.basetest.BaseLeapTest

get_expected_openvpn_args(with_openvpn_ciphers=False)

yeah, this is almost as duplicating the code for building the command

maxDiff = None
provider = 'testprovider.example.org'
setUp()
tearDown()
test_build_ovpn_command_empty_config()
test_build_ovpn_command_openvpnoptions()
test_get_eip_gateway()
touch_exec()
write_sample_eipconfig()
write_sample_eipservice(vpnciphers=False, extra_vpnopts=None, gateways=None)

test_eipconnection Module

class leap.eip.tests.test_eipconnection.EIPConductorTest(methodName='runTest')

Bases: leap.testing.basetest.BaseLeapTest

cleanupSocketDir()
doCleanups()
provider = 'testprovider.example.org'
setUp()
tearDown()
test_bad_poll_connection_state()

get connection state raises ConnectionRefusedError state is None

test_config_checked_called()
test_connect()

connect calls _launch_openvpn private

test_disconnect()

disconnect method calls private and changes status

test_good_poll_connection_state()
test_ovpn_command()

set_ovpn_command called

test_vpnconnection_defaults()

default attrs as expected

class leap.eip.tests.test_eipconnection.MockedEIPConnection(provider_cert_checker=<class 'leap.eip.checks.ProviderCertChecker'>, config_checker=<class 'leap.eip.checks.EIPConfigChecker'>, *args, **kwargs)

Bases: leap.eip.eipconnection.EIPConnection

exception leap.eip.tests.test_eipconnection.NotImplementedError

Bases: exceptions.Exception

test_openvpnconnection Module

class leap.eip.tests.test_openvpnconnection.MockedOpenVPNConnection(*args, **kwargs)

Bases: leap.eip.openvpnconnection.OpenVPNConnection

connect_to_management()
exception leap.eip.tests.test_openvpnconnection.NotImplementedError

Bases: exceptions.Exception

class leap.eip.tests.test_openvpnconnection.OpenVPNConnectionTest(methodName='runTest')

Bases: leap.testing.basetest.BaseLeapTest

cleanupSocketDir()
doCleanups()
setUp()
tearDown()
test_connect(test_item)
test_detect_vpn()
test_lin_mac_default_init()

check default host for management iface

test_port_types_init()
test_uds_telnet_called_on_connect()
test_win_default_init(*args, **kwargs)

check default host for management iface

Table Of Contents

Previous topic

eip Package

Next topic

gui Package

This Page