Skip to content

Commit

Permalink
Update dependencies and fix WebSocketDisconnect
Browse files Browse the repository at this point in the history
error
  • Loading branch information
abersheeran committed Nov 6, 2023
1 parent d70db66 commit e47d25b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 28 deletions.
54 changes: 29 additions & 25 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ doc = [
test = [
"httpx<1.0.0,>=0.19.0",
"pytest<8.0.0,>=7.2.1",
"requests<3.0.0,>=2.25.1",
"starlette<0.15.0,>=0.14.2",
"starlette>=0.14.2",
"setuptools>=59.6", # to fix the fuck `No module named 'pkg_resources'`
"pytest-cov>=4.0.0",
"coverage>=6.3",
Expand Down
3 changes: 2 additions & 1 deletion tests/test_asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,8 @@ async def app(websocket: WebSocket) -> None:

client = TestClient(app)
with pytest.raises(WebSocketDisconnect) as exc:
client.websocket_connect("/")
with client.websocket_connect("/"):
pass
assert exc.value.code == 1001


Expand Down

0 comments on commit e47d25b

Please sign in to comment.