- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for test_stream_session (0.51 sec)
-
tests/test_dependency_after_yield_streaming.py
response = client.get("/data") assert response.json() == ["foo", "bar", "baz"] def test_stream_simple(): response = client.get("/stream-simple") assert response.text == "xyz" def test_stream_session(): response = client.get("/stream-session") assert response.text == "foobarbaz" def test_broken_session_data(): with pytest.raises(ValueError, match="Session closed"):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 3.2K bytes - Viewed (0) -
tests/test_dependency_yield_scope_websockets.py
async def request_scope(websocket: WebSocket, session: SessionRequestDep) -> Any: await websocket.accept() await websocket.send_json({"is_open": session.open}) @app.websocket("/two-scopes") async def get_stream_session( websocket: WebSocket, function_session: SessionFuncDep, request_session: SessionRequestDep, ) -> Any: await websocket.accept() await websocket.send_json(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 6K bytes - Viewed (0) -
tests/test_dependency_yield_scope.py
def request_scope(session: SessionRequestDep) -> Any: def iter_data(): yield json.dumps({"is_open": session.open}) return StreamingResponse(iter_data()) @app.get("/two-scopes") def get_stream_session( function_session: SessionFuncDep, request_session: SessionRequestDep ) -> Any: def iter_data(): yield json.dumps(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 6.7K bytes - Viewed (0)