Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Oct 1, 2024
1 parent 5af4a04 commit 599374e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/test_client_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -1480,7 +1480,11 @@ async def test_connection_key_with_proxy() -> None:
"""Verify the proxy headers are included in the ConnectionKey when a proxy is used."""
proxy = URL("http://proxy.example.com")
req = ClientRequest(
"GET", URL("http://example.com"), proxy=proxy, proxy_headers={"X-Proxy": "true"}
"GET",
URL("http://example.com"),
proxy=proxy,
proxy_headers={"X-Proxy": "true"},
loop=asyncio.get_running_loop(),
)
assert req.connection_key.proxy_headers_hash is not None
await req.close()
Expand All @@ -1490,7 +1494,10 @@ async def test_connection_key_without_proxy() -> None:
"""Verify the proxy headers are not included in the ConnectionKey when a proxy is used."""
# If proxy is unspecified, proxy_headers should be ignored
req = ClientRequest(
"GET", URL("http://example.com"), proxy_headers={"X-Proxy": "true"}
"GET",
URL("http://example.com"),
proxy_headers={"X-Proxy": "true"},
loop=asyncio.get_running_loop(),
)
assert req.connection_key.proxy_headers_hash is None
await req.close()

0 comments on commit 599374e

Please sign in to comment.