Skip to content

Commit

Permalink
Upgrade httpcore>=1.0.4 and remove connection hang workaround in tests
Browse files Browse the repository at this point in the history
Fix #7
  • Loading branch information
frankie567 committed Feb 22, 2024
1 parent cd0a3dc commit f0a1149
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ requires-python = ">=3.8"
dependencies = [
"anyio",
"httpx>=0.23.1",
"httpcore>=0.17.3",
"httpcore>=1.0.4",
"wsproto",
]

Expand Down
8 changes: 0 additions & 8 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ async def aclose(self) -> None:
async def test_receive(self, server_factory: ServerFactoryFixture):
async def websocket_endpoint(websocket: WebSocket):
await websocket.accept()
await anyio.sleep(0.1) # FIXME: see #7

await websocket.send_text("SERVER_MESSAGE")

Expand Down Expand Up @@ -343,7 +342,6 @@ async def test_receive_oversized_message(
):
async def websocket_endpoint(websocket: WebSocket):
await websocket.accept()
await anyio.sleep(0.1) # FIXME: see #7

method = getattr(websocket, send_method)
await method(full_message)
Expand Down Expand Up @@ -380,7 +378,6 @@ async def websocket_endpoint(websocket: WebSocket):
async def test_receive_text(self, server_factory: ServerFactoryFixture):
async def websocket_endpoint(websocket: WebSocket):
await websocket.accept()
await anyio.sleep(0.1) # FIXME: see #7

await websocket.send_text("SERVER_MESSAGE")

Expand Down Expand Up @@ -410,7 +407,6 @@ async def test_receive_text_invalid_type(
):
async def websocket_endpoint(websocket: WebSocket):
await websocket.accept()
await anyio.sleep(0.1) # FIXME: see #7

await websocket.send_bytes(b"SERVER_MESSAGE")

Expand Down Expand Up @@ -438,7 +434,6 @@ async def websocket_endpoint(websocket: WebSocket):
async def test_receive_bytes(self, server_factory: ServerFactoryFixture):
async def websocket_endpoint(websocket: WebSocket):
await websocket.accept()
await anyio.sleep(0.1) # FIXME: see #7

await websocket.send_bytes(b"SERVER_MESSAGE")

Expand Down Expand Up @@ -468,7 +463,6 @@ async def test_receive_bytes_invalid_type(
):
async def websocket_endpoint(websocket: WebSocket):
await websocket.accept()
await anyio.sleep(0.1) # FIXME: see #7

await websocket.send_text("SERVER_MESSAGE")

Expand All @@ -493,7 +487,6 @@ async def test_receive_json(
):
async def websocket_endpoint(websocket: WebSocket):
await websocket.accept()
await anyio.sleep(0.1) # FIXME: see #7

await websocket.send_json({"message": "SERVER_MESSAGE"}, mode=mode)

Expand Down Expand Up @@ -811,7 +804,6 @@ async def websocket_endpoint(websocket: WebSocket):
async def test_receive_close(server_factory: ServerFactoryFixture):
async def websocket_endpoint(websocket: WebSocket):
await websocket.accept()
await anyio.sleep(0.1) # FIXME: see #7
await websocket.close()

with server_factory(websocket_endpoint) as socket:
Expand Down

0 comments on commit f0a1149

Please sign in to comment.