3.0.ipv8.test.test_peer ======================= .. py:module:: 3.0.ipv8.test.test_peer Classes ------- .. autoapisummary:: 3.0.ipv8.test.test_peer.TestPeer Module Contents --------------- .. py:class:: TestPeer(methodName: str = 'runTest') Bases: :py:obj:`3.0.ipv8.test.base.TestBase` Tests related to the peer class. .. py:attribute:: test_key .. py:method:: setUp() -> None Set up a peer to test with. .. py:method:: test_default_timestamp() -> None Check if the default Lamport timestamp of a Peer is 0. .. py:method:: test_increment_timestamp() -> None Check if the Lamport timestamp of a Peer can be incremented. .. py:method:: test_increase_timestamp() -> None Check if the Lamport timestamp of a Peer can be increased arbitrarily. .. py:method:: test_decrease_timestamp() -> None Check if the Lamport timestamp of a Peer cannot be decreased. .. py:method:: test_peer_equality() -> None Check if peers with the same key and address are equal. .. py:method:: test_peer_inequality_key() -> None Check if peers with a different key and same address are not equal. .. py:method:: test_median_ping_none() -> None No ping measurements should lead to a None median ping. .. py:method:: test_avg_ping_none() -> None No ping measurements should lead to a None average ping. .. py:method:: test_median_ping_odd() -> None Median ping should return the median ping for odd length measurements. .. py:method:: test_median_ping_even() -> None Median ping should return the median ping for even length measurements. .. py:method:: test_avg_ping() -> None Average ping should return the average ping. .. py:method:: test_peer_inequality_address() -> None Check if peers with the same key and a different address are equal. .. py:method:: test_to_string() -> None Check if the __str__ method functions properly. .. py:method:: test_set_address_init() -> None Check if the address property properly sets from the init. .. py:method:: test_set_address_setter() -> None Check if the address property properly sets from the setter. .. py:method:: test_set_address_add() -> None Check if the address property properly sets from add_address. .. py:method:: test_set_address_addv6() -> None Check if IPv6 addresses are properly returned. .. py:method:: test_set_address_frozen() -> None Check if the add_address does not update frozen addresses. .. py:method:: test_address_order1() -> None Check if IPv6 is preferred over IPv4 (append out-of-order). .. py:method:: test_address_order2() -> None Check if IPv6 is preferred over IPv4 (append in-order). .. py:method:: test_default_address() -> None Check if the default address is UDPv4Address("0.0.0.0", 0). .. py:method:: test_manual_update() -> None Check if manual updates to the addresses dictionary are caught. .. py:method:: test_manual_updates() -> None Check if manual updates to the addresses dictionary are caught (double update, out-of-order). .. py:method:: test_manual_update_overwrite() -> None Check if manual updates to the addresses dictionary are caught (overwrite same class).