3.0.ipv8.test.REST.test_isolation_endpoint

Classes

Module Contents

class 3.0.ipv8.test.REST.test_isolation_endpoint.MockSettings

Mock tunnel settings.

peer_flags
class 3.0.ipv8.test.REST.test_isolation_endpoint.MockTunnelCommunity(settings: 3.0.ipv8.messaging.anonymization.community.TunnelSettings)

Bases: 3.0.ipv8.messaging.anonymization.community.TunnelCommunity, 3.0.ipv8.test.mocking.community.MockCommunity

Fake TunnelCommunity just for circuit management.

settings
circuits
relay_from_to
exit_sockets
bootstrappers
class 3.0.ipv8.test.REST.test_isolation_endpoint.TestIsolationEndpoint(methodName: str = 'runTest')

Bases: 3.0.ipv8.test.base.TestBase[MockTunnelCommunity]

Tests for REST requests to the isolation endpoint.

FAKE_BOOTSTRAP_ADDRESS = ('127.0.0.1', 0)
async setUp() None

Set up with a fake tunnel community.

bootstrap_addresses() list[3.0.ipv8.types.Address]

Get the bootstrapper ip addresses.

async test_no_ip() None

Test if requests that do not specify an IP are rejected.

async test_no_port() None

Test if requests that do not specify a port are rejected.

async test_no_choice() None

Test if requests that do not specify a to add either an exit node or a bootstrap server.

async test_add_bootstrap() None

Check if bootstrap nodes are correctly added.

A successfully added bootstrap node is walked to.

async test_add_exit() None

Check if exit nodes are correctly added.

A successfully added exit node is walked to.