Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
lundberg authored Jul 1, 2021
2 parents e7b6faf + 67e2e25 commit 222579f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ async def test_pass_through(client, using, route, expected):
request = respx_mock.add(route)

with mock.patch(
"asyncio.open_connection",
"anyio.connect_tcp",
side_effect=ConnectionRefusedError("test request blocked"),
) as open_connection:
with pytest.raises(httpx.NetworkError):
Expand All @@ -399,7 +399,7 @@ async def test_pass_through(client, using, route, expected):
request = respx_mock.add(route)

with mock.patch(
"socket.socket.connect", side_effect=socket.error("test request blocked")
"socket.create_connection", side_effect=socket.error("test request blocked")
) as connect:
with pytest.raises(httpx.NetworkError):
httpx.get("https://example.org/")
Expand Down

0 comments on commit 222579f

Please sign in to comment.