latest.ipv8.test.dht.test_community

Module Contents

Classes

TestDHTCommunity

Tests for the DHT Community.

TestDHTCommunityXL

Fat tests for the DHT Community.

class latest.ipv8.test.dht.test_community.TestDHTCommunity

Bases: latest.ipv8.test.dht.base.TestDHTBase[latest.ipv8.dht.community.DHTCommunity]

Tests for the DHT Community.

setUp() None

Setup with two nodes.

create_node(*args, **kwargs) latest.ipv8.test.mocking.ipv8.MockIPv8

Create a new node that runs the DHTCommunity with a curve25519 key.

async test_routing_table() None

Test if the routing table is properly updated.

async test_ping_pong() None

Tests if pings are properly propagated.

async test_ping_pong_fail() None

Test if pings can timeout.

async test_store_value() None

Test if values are properly stored.

async test_store_value_fail() None

Test if values are not stored irresponsibly.

async test_find_nodes() None

Test if nodes can be found.

async test_find_values() None

Test if values can be found.

async test_find_values_signed() None

Test if signed values can be found.

async test_caching() None

Test if values are cached.

async test_refresh() None

Test if refreshing works.

async test_token() None

Test if tokens work.

async test_rate_limit() None

Test that the rate limit is respected.

async test_unload_while_contacting_node() None

Test unloading nodes while contacting them.

class latest.ipv8.test.dht.test_community.TestDHTCommunityXL

Bases: latest.ipv8.test.dht.base.TestDHTBase[latest.ipv8.dht.community.DHTCommunity]

Fat tests for the DHT Community.

setUp() None

Set up 15 nodes that run the DHT Community.

create_node(*args, **kwargs) latest.ipv8.test.mocking.ipv8.MockIPv8

Create a new node that runs the DHTCommunity with a curve25519 key.

get_closest_nodes(node_id: bytes, max_nodes: int = 8) Iterable[latest.ipv8.test.mocking.ipv8.MockIPv8]

Get the nodes closest to a given node id.

async test_full_protocol() None

Check if the full DHT protocol works.