latest.ipv8.test.messaging.interfaces.dispatcher.test_endpoint
Module Contents
Classes
This class simply listens on an endpoint and stores incoming packets in a list. |
|
Non-functional endpoint for manual staging and inspection. |
|
This class contains various tests for the DispatcherEndpoint. |
- class latest.ipv8.test.messaging.interfaces.dispatcher.test_endpoint.DummyEndpointListener(endpoint: latest.ipv8.messaging.interfaces.endpoint.Endpoint)
Bases:
latest.ipv8.messaging.interfaces.endpoint.EndpointListener
This class simply listens on an endpoint and stores incoming packets in a list.
- class latest.ipv8.test.messaging.interfaces.dispatcher.test_endpoint.DummyEndpoint
Bases:
latest.ipv8.messaging.interfaces.endpoint.Endpoint
Non-functional endpoint for manual staging and inspection.
- get_address() latest.ipv8.types.Address
Give a fake localhost IPv4 address.
- class latest.ipv8.test.messaging.interfaces.dispatcher.test_endpoint.TestDispatcherEndpoint(methodName: str = 'runTest')
Bases:
latest.ipv8.test.base.TestBase
This class contains various tests for the DispatcherEndpoint.
- RANDOM_DATA = b'data'
- async static _produce_dummy() tuple[latest.ipv8.messaging.interfaces.dispatcher.endpoint.DispatcherEndpoint, DummyEndpoint, DummyEndpointListener]
Create and open a DispatcherEndpoint, dispatching to a dummy endpoint and listener.
- async test_initialize_no_interfaces() None
Check if the DispatcherEndpoint can initialize and “send” without interfaces.
This is black-hole functionality and should not crash (though we can’t really assert anything here).
- async test_dispatch_receive() None
Check if packet reception is correctly propagated from children.
- async test_dispatch_send_specific() None
Check if packet sending is correctly propagated to children, with specific interface.
- async test_get_address_specific() None
Check if get_address is correctly propagated from children, with specific interface.
- async test_add_prefix_listener() None
Check if add_prefix_listener is correctly propagated to children.
- async test_guess_interface_ipv4() None
Check if guess_interface guesses IPv4 interfaces correctly.
- async test_guess_interface_ipv6() None
Check if guess_interface guesses IPv6 interfaces correctly.
- async test_guess_interface_ipv6_short() None
Check if guess_interface guesses shortened IPv6 interfaces correctly.
- async test_guess_interface_ipv6_very_short() None
Check if guess_interface guesses zero-omitted IPv6 interfaces correctly.