From 319e707eaed586415c7332c6652cee8e276f8d89 Mon Sep 17 00:00:00 2001 From: Titusz Pan Date: Mon, 18 Nov 2024 12:28:08 +0100 Subject: [PATCH] test: Add test for invalid MF with strict validation disabled --- tests/test_codec.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_codec.py b/tests/test_codec.py index 88062d2..688a854 100644 --- a/tests/test_codec.py +++ b/tests/test_codec.py @@ -666,6 +666,9 @@ def test_iscc_validate_mf_invalid(): ic.iscc_validate_mf(sample, strict=True) assert str(excinfo.value) == "Header expects 32 but got 26 bytes" + INVALID_MF_B32H = "vpg0i00b2jtnrtm1c0v6" + assert ic.iscc_validate_mf(INVALID_MF_B32H, strict=False) is False + def test_iscc_validate_mscdi(): sample = "ISCC:KEDRRHYRYJ7XELW7HAO5FFGQRX75HJUKSUSZVWTTRNHTF2YL5SKP7XIUFXM4KMKXEZZA"