Skip to content

Commit 2b8683c

Browse files
committed
Update metric header test logic for TestHttpxAsyncClient
1 parent 1eab897 commit 2b8683c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_http_client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,10 @@ def check_headers(
600600
if has_metrics:
601601
for header_key in _http_client.METRICS_HEADERS:
602602
assert header_key in headers
603-
assert headers.get(header_key) == _http_client.METRICS_HEADERS.get(header_key)
603+
expected_metrics_header = _http_client.METRICS_HEADERS.get(header_key, '')
604+
if has_auth:
605+
expected_metrics_header += ' mock-cred-metric-tag'
606+
assert headers.get(header_key) == expected_metrics_header
604607

605608

606609
class TestGoogleAuthCredentialFlow:

0 commit comments

Comments
 (0)