tribler.test_unit.core.database.test_serialization

Classes

TestSerialization

Tests for the serialization logic.

Module Contents

class tribler.test_unit.core.database.test_serialization.TestSerialization

Bases: ipv8.test.base.TestBase

Tests for the serialization logic.

test_time2int() None

Test if time2int normalizes timestamps based on the supplied epoch.

test_int2time() None

Test if int2time normalizes timestamps based on the supplied epoch.

test_read_payload_with_offset_unknown() None

Test if unknown payload formats throw a UnknownBlobTypeException.

test_read_payload_with_offset_regular_torrent() None

Test if TorrentMetadataPayload payload formats are correctly decoded.

test_signed_payload_sign() None

Test if signing a SignedPayload and unpacking it, leads to the same payload.

test_signed_payload_to_dict_signed() None

Test if converting a signed SignedPayload to a dict and loading it again, leads to the same payload.

test_signed_payload_to_dict_unsigned() None

Test if converting an unsigned SignedPayload to a dict and loading it again, leads to the same payload.

test_get_magnet() None

Test if TorrentMetadataPayload can generated magnet links from its infohash.

test_auto_convert_torrent_date() None

Test if TorrentMetadataPayload automatically converts its torrent date from int to datetime.

test_health_items_payload() None

Test if HealthItemsPayload is correctly unpacked.

test_health_items_payload_no_data() None

Test if HealthItemsPayload without data is correctly unpacked.

test_health_items_payload_missing_data() None

Test if HealthItemsPayload with missing data gets error values.

test_health_items_payload_illegal_data() None

Test if HealthItemsPayload with illegal data gets error values.

test_health_items_payload_negative_data() None

Test if HealthItemsPayload with negatve data gets error values.