latest.ipv8.test.messaging.anonymization.test_hiddenservices
Module Contents
Classes
Tests related to the HiddenTunnelCommunity. |
- class latest.ipv8.test.messaging.anonymization.test_hiddenservices.TestHiddenServices(methodName: str = 'runTest')
Bases:
latest.ipv8.test.base.TestBase
[latest.ipv8.messaging.anonymization.hidden_services.HiddenTunnelCommunity
]Tests related to the HiddenTunnelCommunity.
- setUp() → None
Set up three nodes and keep track of nodes that should remain hidden from other nodes.
- get_e2e_circuit_path() → list[tuple[latest.ipv8.types.Address, latest.ipv8.messaging.anonymization.tunnel.RoutingObject]] | None
Return the e2e circuit information which is extracted from the nodes. Useful for debugging purposes or to verify whether the e2e circuit is correctly established.
- create_node(settings: None = None, create_dht: bool = False, enable_statistics: bool = False) → latest.ipv8.test.mocking.ipv8.MockIPv8
Initialize a HiddenTunnelCommunity without circuits or exit node functionality.
- async create_intro(node_nr: int, service: bytes, required_ip: latest.ipv8.peer.Peer | None = None) → None
Create an 1 hop introduction point for some node for some service.
- async test_create_introduction_point() → None
Check if setting up an introduction point works. Some node, other than the instigator, should be assigned as the intro point.
- async test_dht_lookup_with_counterparty() → None
Check if a DHT lookup works.
- Steps:
Create an introduction point
Do a DHT lookup
Create a rendezvous point
Link the circuit e2e
Callback the service handler
Send data
Remove circuits
- async test_dht_lookup_no_counterparty() → None
Check if a DHT lookup doesn’t return on its own required service. Ergo, no self-introduction.
- async test_dht_lookup_failure() → None
Check that if a DHT lookup fails, it will retry during the next do_peer_discovery call.