- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 310 for cookey (0.1 sec)
-
tests/test_param_include_in_schema.py
{"hidden_cookie": "somevalue"}, 200, {"hidden_cookie": "somevalue"}, ), ], ) def test_hidden_cookie(path, cookies, expected_status, expected_response): client = TestClient(app, cookies=cookies) response = client.get(path) assert response.status_code == expected_status assert response.json() == expected_response @pytest.mark.parametrize(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 7.4K bytes - Viewed (0) -
tests/test_tutorial/test_cookie_params/test_tutorial001_an_py310.py
{"ads_id": "ads_track"}, ), ("/items", {"session": "cookiesession"}, 200, {"ads_id": None}), ], ) def test(path, cookies, expected_status, expected_response): from docs_src.cookie_params.tutorial001_an_py310 import app client = TestClient(app, cookies=cookies) response = client.get(path) assert response.status_code == expected_status assert response.json() == expected_response
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.1K bytes - Viewed (0) -
tests/test_tutorial/test_cookie_params/test_tutorial001.py
200, {"ads_id": "ads_track"}, ), ("/items", {"session": "cookiesession"}, 200, {"ads_id": None}), ], ) def test(path, cookies, expected_status, expected_response): client = TestClient(app, cookies=cookies) response = client.get(path) assert response.status_code == expected_status assert response.json() == expected_response def test_openapi_schema():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 3.9K bytes - Viewed (0) -
docs_src/response_cookies/tutorial001.py
from fastapi import FastAPI from fastapi.responses import JSONResponse 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")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 344 bytes - Viewed (0) -
docs_src/response_cookies/tutorial002.py
from fastapi import FastAPI, Response app = FastAPI() @app.post("/cookie-and-object/") def create_cookie(response: Response): response.set_cookie(key="fakesession", value="fake-cookie-session-value")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 272 bytes - Viewed (0) -
tests/test_tutorial/test_cookie_params/test_tutorial001_an_py39.py
{"ads_id": "ads_track"}, ), ("/items", {"session": "cookiesession"}, 200, {"ads_id": None}), ], ) def test(path, cookies, expected_status, expected_response): from docs_src.cookie_params.tutorial001_an_py39 import app client = TestClient(app, cookies=cookies) response = client.get(path) assert response.status_code == expected_status assert response.json() == expected_response
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.1K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_an_py310.py
def test_websocket_with_cookie(app: FastAPI): 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"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 3.9K bytes - Viewed (0) -
tests/test_tutorial/test_cookie_params/test_tutorial001_an.py
200, {"ads_id": "ads_track"}, ), ("/items", {"session": "cookiesession"}, 200, {"ads_id": None}), ], ) def test(path, cookies, expected_status, expected_response): client = TestClient(app, cookies=cookies) response = client.get(path) assert response.status_code == expected_status assert response.json() == expected_response def test_openapi_schema():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 3.9K bytes - Viewed (0) -
tests/test_security_api_key_cookie_description.py
"components": { "securitySchemes": { "APIKeyCookie": { "type": "apiKey", "name": "key", "in": "cookie", "description": "An API Cookie Key", } } },
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_an_py39.py
def test_websocket_with_cookie(app: FastAPI): 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"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 3.9K bytes - Viewed (0)