def test_id_to_header_conversion():
# Test passing a standard Integer ID
original_id = instana.util.generate_id()
converted_id = instana.util.id_to_header(original_id)
# Assert that it is a string and there are no non-hex characters
assert isinstance(converted_id, string_types)
assert all(c in string.hexdigits for c in converted_id)
# Test passing a standard Integer ID as a String
original_id = instana.util.generate_id()
converted_id = instana.util.id_to_header(original_id)
# Assert that it is a string and there are no non-hex characters
assert isinstance(converted_id, string_types)
assert all(c in string.hexdigits for c in converted_id)
评论列表
文章目录