latest.ipv8.test.test_community
Module Contents
Classes
Old-style community that does not support new-style introduction requests. |
|
A new-style supporting community. |
|
Tests for interoperability between old-style and new-style IPv8 Communities. |
|
Faulty community that has no id specified. |
|
Faulty community that has a wrong community id type. |
|
Tests for initializing new Communities. |
|
Tests for the Community to Bootstrapper interface. |
- class latest.ipv8.test.test_community.OldCommunity(settings: CommunitySettings)
Bases:
latest.ipv8.community.Community
Old-style community that does not support new-style introduction requests.
- community_id
- create_introduction_request(socket_address: latest.ipv8.types.Address, extra_bytes: bytes = b'', new_style: bool = False, prefix: bytes | None = None) bytes
Make sure all sent introduction requests are flagged as old style.
- create_introduction_response(lan_socket_address: latest.ipv8.types.Address, socket_address: latest.ipv8.types.Address, identifier: int, introduction: latest.ipv8.peer.Peer | None = None, extra_bytes: bytes = b'', prefix: bytes | None = None, new_style: bool = False) bytes
Make sure all sent introduction responses are flagged as old style.
- class latest.ipv8.test.test_community.NewCommunity(settings: CommunitySettings)
Bases:
latest.ipv8.community.Community
A new-style supporting community.
- community_id
- class latest.ipv8.test.test_community.TestCommunityCompatibility
Bases:
latest.ipv8.test.base.TestBase
Tests for interoperability between old-style and new-style IPv8 Communities.
- endpoint_listener(i: int) latest.ipv8.test.mocking.endpoint.MockEndpointListener
Shortcut to the endpoint listener of node i.
- class latest.ipv8.test.test_community.NoIDCommunity(settings: CommunitySettings)
Bases:
latest.ipv8.community.Community
Faulty community that has no id specified.
- class latest.ipv8.test.test_community.StrangeIDCommunity(settings: CommunitySettings)
Bases:
latest.ipv8.community.Community
Faulty community that has a wrong community id type.
- community_id
- class latest.ipv8.test.test_community.TestCommunityInit
Bases:
latest.ipv8.test.base.TestBase
Tests for initializing new Communities.
A test for a Community with a valid id is omitted as this is already covered by other tests.
- class latest.ipv8.test.test_community.TestCommunityBootstrapping
Bases:
latest.ipv8.test.base.TestBase
Tests for the Community to Bootstrapper interface.
Note: don’t put tests for the Bootstrapper implementations here.