latest.ipv8.test.attestation.identity.test_identity

Module Contents

Classes

TestIdentityCommunity

Tests related to the identity community's behaviors.

class latest.ipv8.test.attestation.identity.test_identity.TestIdentityCommunity(methodName: str = 'runTest')

Bases: latest.ipv8.test.base.TestBase[latest.ipv8.attestation.identity.community.IdentityCommunity]

Tests related to the identity community’s behaviors.

FAKE_HASH
setUp() None

Create two nodes.

create_node(settings: latest.ipv8.community.CommunitySettings | None = None, create_dht: bool = False, enable_statistics: bool = False) latest.ipv8.test.base.MockIPv8

Use a memory-based identity manager for each community.

async test_advertise() None

Check if a node can construct an advertisement for his attested attribute.

async test_advertise_twice() None

Check if a node can construct two attributes.

async test_advertise_big() None

Check if a node can construct an advertisement for his attested attribute, having more than 32 attributes.

async test_advertise_metadata() None

Check if a node can construct an advertisement for his attested attribute with metadata.

async test_advertise_metadata_reject() None

Check if a node cannot construct an advertisement for his attested attribute with wrong metadata.

async test_advertise_reject_hash() None

Check if unknown hashes are not signed.

async test_advertise_reject_public_key() None

Check if we don’t sign correct hashes for the wrong peer.

async test_advertise_reject_old() None

Check if we don’t sign old attestations.

async test_advertise_reject_wrong_name() None

Check if we don’t sign attestations with incorrect metadata.