3.0.ipv8.test.dht.test_community ================================ .. py:module:: 3.0.ipv8.test.dht.test_community Classes ------- .. autoapisummary:: 3.0.ipv8.test.dht.test_community.TestDHTCommunity 3.0.ipv8.test.dht.test_community.TestDHTCommunityXL Module Contents --------------- .. py:class:: TestDHTCommunity Bases: :py:obj:`3.0.ipv8.test.dht.base.TestDHTBase`\ [\ :py:obj:`3.0.ipv8.dht.community.DHTCommunity`\ ] Tests for the DHT Community. .. py:method:: setUp() -> None Setup with two nodes. .. py:method:: create_node(*args, **kwargs) -> 3.0.ipv8.test.mocking.ipv8.MockIPv8 Create a new node that runs the DHTCommunity with a curve25519 key. .. py:method:: test_routing_table() -> None :async: Test if the routing table is properly updated. .. py:method:: test_ping_pong() -> None :async: Tests if pings are properly propagated. .. py:method:: test_ping_pong_fail() -> None :async: Test if pings can timeout. .. py:method:: test_store_value() -> None :async: Test if values are properly stored. .. py:method:: test_store_value_fail() -> None :async: Test if values are not stored irresponsibly. .. py:method:: test_find_nodes() -> None :async: Test if nodes can be found. .. py:method:: test_find_values() -> None :async: Test if values can be found. .. py:method:: test_find_values_signed() -> None :async: Test if signed values can be found. .. py:method:: test_caching() -> None :async: Test if values are cached. .. py:method:: test_refresh() -> None :async: Test if refreshing works. .. py:method:: test_token() -> None :async: Test if tokens work. .. py:method:: test_rate_limit() -> None :async: Test that the rate limit is respected. .. py:method:: test_unload_while_contacting_node() -> None :async: Test unloading nodes while contacting them. .. py:class:: TestDHTCommunityXL Bases: :py:obj:`3.0.ipv8.test.dht.base.TestDHTBase`\ [\ :py:obj:`3.0.ipv8.dht.community.DHTCommunity`\ ] Fat tests for the DHT Community. .. py:method:: setUp() -> None Set up 15 nodes that run the DHT Community. .. py:method:: create_node(*args, **kwargs) -> 3.0.ipv8.test.mocking.ipv8.MockIPv8 Create a new node that runs the DHTCommunity with a curve25519 key. .. py:method:: get_closest_nodes(node_id: bytes, max_nodes: int = 8) -> collections.abc.Iterable[3.0.ipv8.test.mocking.ipv8.MockIPv8] Get the nodes closest to a given node id. .. py:method:: test_full_protocol() -> None :async: Check if the full DHT protocol works.