Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 4 of 4 for fakesession (0.06 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. tests/test_tutorial/test_websockets/test_tutorial002.py

        client = TestClient(app, cookies={"session": "fakesession"})
        with pytest.raises(WebSocketDisconnect):
            with client.websocket_connect("/items/foo/ws") as websocket:
                message = "Message one"
                websocket.send_text(message)
                data = websocket.receive_text()
                assert data == "Session cookie or query token value is: fakesession"
                data = websocket.receive_text()
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 4.1K bytes
    - Click Count (0)
  2. tests/test_tutorial/test_response_cookies/test_tutorial001.py

        response = client.post("/cookie/")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Come to the dark side, we have cookies"}
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 408 bytes
    - Click Count (0)
  3. tests/test_tutorial/test_response_cookies/test_tutorial002.py

        response = client.post("/cookie-and-object/")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Come to the dark side, we have cookies"}
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 419 bytes
    - Click Count (0)
  4. docs_src/response_cookies/tutorial001_py39.py

    app = FastAPI()
    
    
    @app.post("/cookie/")
    def create_cookie():
        content = {"message": "Come to the dark side, we have cookies"}
        response = JSONResponse(content=content)
        response.set_cookie(key="fakesession", value="fake-cookie-session-value")
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 344 bytes
    - Click Count (0)
Back to Top