def test_unpack_byte_array_int(): (value, array_bytes_consumed) = DecodeUtils.unpack_byte_array( b"\x00\x00\x00\x10application/json", length_byte_size=4 ) assert array_bytes_consumed == 20 assert value == b"application/json"
def test_unpack_array_short(): test_bytes = b"\x00\x10application/json" (value, bytes_consumed) = DecodeUtils.unpack_byte_array(test_bytes) assert bytes_consumed == 18 assert value == b"application/json"