latest.ipv8.test.messaging.interfaces.test_network_stats

Module Contents

Classes

TestNetworkStat

Tests related to the network stat object.

class latest.ipv8.test.messaging.interfaces.test_network_stats.TestNetworkStat(methodName: str = 'runTest')

Bases: latest.ipv8.test.base.TestBase

Tests related to the network stat object.

async test_initialize() None

Check if the starting values of NetworkStat are sane.

async test_add_sent_stat() None

Check if an added sent statistic is correctly registered.

async test_add_sent_stat_first_up() None

Check if the first_measured_up is correctly registered on send.

async test_add_received_stat() None

Check if an added received statistic is correctly registered.

async test_add_received_stat_first_down() None

Check if the first_measured_up is correctly registered on receive.

async test_to_dict() None

Check if the dictionary form of the NetworkStat is correct.

async test_to_str() None

Check if a NetworkStat is correctly formatted as a str.