3.0.ipv8.test.messaging.anonymization.test_hiddenservices ========================================================= .. py:module:: 3.0.ipv8.test.messaging.anonymization.test_hiddenservices Classes ------- .. autoapisummary:: 3.0.ipv8.test.messaging.anonymization.test_hiddenservices.TestHiddenServices Module Contents --------------- .. py:class:: TestHiddenServices(methodName: str = 'runTest') Bases: :py:obj:`3.0.ipv8.test.base.TestBase`\ [\ :py:obj:`3.0.ipv8.messaging.anonymization.hidden_services.HiddenTunnelCommunity`\ ] Tests related to the HiddenTunnelCommunity. .. py:method:: setUp() -> None Set up three nodes and keep track of nodes that should remain hidden from other nodes. .. py:method:: tearDown() -> None :async: Make sure to also tear down our hidden nodes. .. py:method:: get_e2e_circuit_path() -> list[tuple[3.0.ipv8.types.Address, 3.0.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. .. py:method:: create_node(settings: None = None, create_dht: bool = False, enable_statistics: bool = False) -> 3.0.ipv8.test.mocking.ipv8.MockIPv8 Initialize a HiddenTunnelCommunity without circuits or exit node functionality. .. py:method:: create_intro(node_nr: int, service: bytes, required_ip: 3.0.ipv8.peer.Peer | None = None) -> None :async: Create an 1 hop introduction point for some node for some service. .. py:method:: assign_exit_node(node_nr: int) -> None :async: Give a node a dedicated exit node to play with. .. py:method:: test_create_introduction_point() -> None :async: Check if setting up an introduction point works. Some node, other than the instigator, should be assigned as the intro point. .. py:method:: test_dht_lookup_with_counterparty() -> None :async: Check if a DHT lookup works. Steps: 1. Create an introduction point 2. Do a DHT lookup 3. Create a rendezvous point 4. Link the circuit e2e 5. Callback the service handler 6. Send data 7. Remove circuits .. py:method:: test_dht_lookup_no_counterparty() -> None :async: Check if a DHT lookup doesn't return on its own required service. Ergo, no self-introduction. .. py:method:: test_dht_lookup_failure() -> None :async: Check that if a DHT lookup fails, it will retry during the next do_peer_discovery call. .. py:method:: test_pex_lookup() -> None :async: Check if peers lookups succeed through the pex communities. .. py:method:: test_pex_lookup_exit_is_ip() -> None :async: Check if peers lookups succeed through the pex communities if the exit is the introduction point. .. py:method:: test_test_request_e2e() -> None :async: Check if sending test-request messages over an e2e circuit works as expected.