Ensure guid is hexadecimal value

This commit is contained in:
mvdbeek
2022-09-08 14:04:35 +02:00
parent 732ac13f48
commit aceaa698fc
2 changed files with 22 additions and 5 deletions
@@ -62,6 +62,17 @@ def test_maximum_length_handling_nonascii():
assert e11 != e12
def test_unicode_null_decoding():
encoded_id = test_helper_1.encode_id(1)
threw_exception = False
try:
test_helper_1.decode_guid(f"{encoded_id[:-1]}\0")
except Exception:
threw_exception = True
assert threw_exception
def test_encode_decode():
# Different ids are encoded differently
assert test_helper_1.encode_id(1) != test_helper_1.encode_id(2)