test_wrong_uri() — fastapi Function Reference
Architecture documentation for the test_wrong_uri() function in test_ws_router.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 64374e7b_4a69_68a1_b747_16aca32a8461["test_wrong_uri()"] b2e4c2fb_8042_93dc_9d79_2ae1a12773d6["test_ws_router.py"] 64374e7b_4a69_68a1_b747_16aca32a8461 -->|defined in| b2e4c2fb_8042_93dc_9d79_2ae1a12773d6 style 64374e7b_4a69_68a1_b747_16aca32a8461 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_ws_router.py lines 177–185
def test_wrong_uri():
"""
Verify that a websocket connection to a non-existent endpoing returns in a shutdown
"""
client = TestClient(app)
with pytest.raises(WebSocketDisconnect) as e:
with client.websocket_connect("/no-router/"):
pass # pragma: no cover
assert e.value.code == status.WS_1000_NORMAL_CLOSURE
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_wrong_uri() do?
test_wrong_uri() is a function in the fastapi codebase, defined in tests/test_ws_router.py.
Where is test_wrong_uri() defined?
test_wrong_uri() is defined in tests/test_ws_router.py at line 177.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free