Exemple #1
0
def test_checksum_class_eq(checksum_class):
    assert checksum_class == Checksum.checksum(CHECKSUM_CLASS_VALUE)
Exemple #2
0
def test_expected_type(obj_type, value):
    assert type(value) == Checksum.checksum(value).type == obj_type
Exemple #3
0
def test_expected_checksum(value, expected_checksum):
    checksum_bytes = Checksum.checksum(value).hex()
    assert checksum_bytes == expected_checksum, "Got '{}'\nExpected '{}' for the checksum of '{}'".format(
        checksum_bytes, expected_checksum, value)
Exemple #4
0
def test_expected_custom_type():
    _ = Checksum.checksum(Custom()).type