latest.ipv8.test.test_configuration

Module Contents

Classes

IPv8ConfigurationSchema

Schema to check the structure (NOT the defaults!) of the IPv8 configuration dict.

TestConfiguration

Tests related to IPv8 configuration.

class latest.ipv8.test.test_configuration.IPv8ConfigurationSchema(*, only: marshmallow.types.StrSequenceOrSet | None = None, exclude: marshmallow.types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: marshmallow.types.StrSequenceOrSet = (), dump_only: marshmallow.types.StrSequenceOrSet = (), partial: bool | marshmallow.types.StrSequenceOrSet | None = None, unknown: str | None = None)

Bases: marshmallow.Schema

Schema to check the structure (NOT the defaults!) of the IPv8 configuration dict.

class LoggerSchema(*, only: marshmallow.types.StrSequenceOrSet | None = None, exclude: marshmallow.types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: marshmallow.types.StrSequenceOrSet = (), dump_only: marshmallow.types.StrSequenceOrSet = (), partial: bool | marshmallow.types.StrSequenceOrSet | None = None, unknown: str | None = None)

Bases: marshmallow.Schema

The expected JSON schema for the logger configuration.

level
class InterfaceSchema(*, only: marshmallow.types.StrSequenceOrSet | None = None, exclude: marshmallow.types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: marshmallow.types.StrSequenceOrSet = (), dump_only: marshmallow.types.StrSequenceOrSet = (), partial: bool | marshmallow.types.StrSequenceOrSet | None = None, unknown: str | None = None)

Bases: marshmallow.Schema

The expected JSON schema for the interfaces configuration.

interface
ip
port
class KeySchema(*, only: marshmallow.types.StrSequenceOrSet | None = None, exclude: marshmallow.types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: marshmallow.types.StrSequenceOrSet = (), dump_only: marshmallow.types.StrSequenceOrSet = (), partial: bool | marshmallow.types.StrSequenceOrSet | None = None, unknown: str | None = None)

Bases: marshmallow.Schema

The expected JSON schema for the keys configuration.

alias
generation
file
class OverlaySchema(*, only: marshmallow.types.StrSequenceOrSet | None = None, exclude: marshmallow.types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: marshmallow.types.StrSequenceOrSet = (), dump_only: marshmallow.types.StrSequenceOrSet = (), partial: bool | marshmallow.types.StrSequenceOrSet | None = None, unknown: str | None = None)

Bases: marshmallow.Schema

The expected JSON schema for an overlay’s configuration.

class WalkerSchema(*, only: marshmallow.types.StrSequenceOrSet | None = None, exclude: marshmallow.types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: marshmallow.types.StrSequenceOrSet = (), dump_only: marshmallow.types.StrSequenceOrSet = (), partial: bool | marshmallow.types.StrSequenceOrSet | None = None, unknown: str | None = None)

Bases: marshmallow.Schema

The expected JSON schema for walker configuration.

strategy
peers
init
klass
key
walkers
bootstrappers
initialize
on_start
working_directory
logger
interfaces
keys
overlays
walker_interval
class latest.ipv8.test.test_configuration.TestConfiguration

Bases: latest.ipv8.test.base.TestBase

Tests related to IPv8 configuration.

assertDictInDict(expected: dict, container: dict) None

Check if a dictionary exists in another dictionary.

test_clear_keys() None

Check if all keys are cleared when requested.

test_clear_overlays() None

Check if all overlays are cleared when requested.

test_change_port() None

Check if changes to the port are finalized.

test_change_address() None

Check if changes to the address are finalized.

test_set_illegal_log_level() None

Check if wrong log levels raise an error immediately.

test_change_log_level() None

Check if changes to the log level are finalized.

test_set_illegal_walk_interval() None

Check if negative walk intervals raise an error on finalization.

test_change_walk_interval() None

Check if changes to the walk interval are finalized.

test_add_key_illegal_curve() None

Check if wrong key curves raise an error immediately.

test_add_key() None

Check if changes to the keys are finalized.

test_add_key_from_bin() None

Check if changes to the keys are finalized in bin mode.

test_add_key_from_bin_file() None

Check if changes to the keys are finalized in bin mode with a file.

test_add_ephemeral_key() None

Check if ephemeral keys are created correctly.

test_add_overlay_overwrite() None

Check if the allow duplicate flag does not introduce duplicates.

test_add_overlay_append() None

Check if the duplicate overlays are simply appended.

test_add_overlay_complex() None

Check if a complex overlay is correctly added.

test_correct_random_churn_strategy() None

The DiscoveryCommunity may use the RandomChurn strategy.

test_correct_periodic_similarity_strategy() None

The DiscoveryCommunity may use the PeriodicSimilarity strategy.

test_default_configuration() None

Check if we can reconstruct the default configuration.

test_default_schema() None

Check if the default configuration is JSON-serializable and follows the expected schema.