latest.ipv8.test.dht.test_routing
Module Contents
Classes
A fake node. |
|
Tests related to the states of nodes. |
|
Tests related to Buckets. |
|
Tests for routing tables. |
- class latest.ipv8.test.dht.test_routing.FakeNode(binary_prefix: str)
Bases:
latest.ipv8.dht.routing.Node
A fake node.
- class latest.ipv8.test.dht.test_routing.TestNode(methodName: str = 'runTest')
Bases:
latest.ipv8.test.base.TestBase
Tests related to the states of nodes.
- class latest.ipv8.test.dht.test_routing.TestBucket(methodName: str = 'runTest')
Bases:
latest.ipv8.test.base.TestBase
Tests related to Buckets.
- class latest.ipv8.test.dht.test_routing.TestRoutingTable(methodName: str = 'runTest')
Bases:
latest.ipv8.test.base.TestBase
Tests for routing tables.
- setUp() None
Create a routing table for a fake node with prefix 1111111111111111111111111111111111111111.
- test_add_single_node() None
Check that adding a node to the routing table inserts it into the trie.
- test_add_multiple_nodes() None
Check that adding multiple nodes causes them to be inserted into the trie.
- test_add_node_full() None
Check that a node is dropped if another node already serves its (max size) prefix.
- test_closest_nodes_single_bucket() None
Check if we can retrieve the closest nodes, in order, to a given id.