tribler.test_unit.core.tunnel.test_community

Classes

TestTriblerTunnelCommunity

Tests for the TriblerTunnelCommunity class.

Module Contents

class tribler.test_unit.core.tunnel.test_community.TestTriblerTunnelCommunity

Bases: ipv8.test.base.TestBase[tribler.core.tunnel.community.TriblerTunnelCommunity]

Tests for the TriblerTunnelCommunity class.

setUp() None

Create a new TriblerTunnelCommunity.

async tearDown() None

Reset the global_dht_services variable.

create_node(settings: ipv8.community.CommunitySettings | None = None, create_dht: bool = False, enable_statistics: bool = False) ipv8.test.mocking.ipv8.MockIPv8

Set up a fake dht provider.

async create_intro(i: int, service: bytes) None

Create an 1 hop introduction point for some node for some service.

async assign_exit_node(i: int) None

Give a node a dedicated exit node to play with.

async test_backup_exitnodes() None

Check if exitnodes are serialized and deserialized to and from disk properly.

test_readd_bittorrent_peers() None

Test the readd bittorrent peers method.

async test_remove_non_existing_circuit() None

Test removing a non-existing circuit.

async test_remove_existing_circuit() None

Test removing an existing circuit.

async test_remove_existing_circuit_later() None

Test removing an existing circuit.

test_monitor_downloads_ignore_hidden() None

Test if hidden downloads get ignored by monitor_downloads.

async test_monitor_downloads_stop_ip() None

Test if we stop building IPs when a download doesn’t exist anymore.

test_monitor_downloads_recreate_ip() None

Test if an old introduction point is recreated.

test_monitor_downloads_leave_swarm() None

Test if we leave the swarm when a download is stopped.

async test_monitor_downloads_intro() None

Test if rendezvous points are removed when a download is stopped.

async test_monitor_downloads_stop_all() None

Test if circuits are removed when all downloads are stopped.

test_update_torrent() None

Test updating a torrent when a circuit breaks.

async test_circuit_reject_too_many() None

Test if a circuit is rejected by an exit node if it already joined the max number of circuits.

test_cache_exitnodes_to_disk() None

Test if we can cache exit nodes to disk.

test_cache_exitnodes_to_disk_os_error() None

Test if we can handle an OSError when caching exit nodes to disk and raise no errors.

async test_should_join_circuit() None

Test if we can join a circuit.