diff --git a/tests/test_utils.py b/tests/test_utils.py index 5391f9c22d..2f5b2e13cf 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -12,7 +12,6 @@ get_ca_bundle_from_env, get_environment_proxies, is_https_redirect, - obfuscate_sensitive_headers, parse_header_links, same_origin, ) @@ -215,10 +214,9 @@ def test_get_environment_proxies(environment, proxies): ], ) def test_obfuscate_sensitive_headers(headers, output): - bytes_headers = [(k.encode(), v.encode()) for k, v in headers] - bytes_output = [(k.encode(), v.encode()) for k, v in output] - assert list(obfuscate_sensitive_headers(headers)) == output - assert list(obfuscate_sensitive_headers(bytes_headers)) == bytes_output + as_dict = {k: v for k, v in output} + headers_class = httpx.Headers({k: v for k, v in headers}) + assert repr(headers_class) == f"Headers({as_dict!r})" def test_same_origin():