- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 1,438 for Fake (0.06 sec)
-
tests/test_tutorial/test_dependencies/test_tutorial006_an_py39.py
"/items/", headers={"X-Token": "fake-super-secret-token", "X-Key": "invalid"} ) assert response.status_code == 400, response.text assert response.json() == {"detail": "X-Key header invalid"} @needs_py39 def test_get_valid_headers(client: TestClient): response = client.get( "/items/", headers={ "X-Token": "fake-super-secret-token",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 5.3K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial012_an_py39.py
"/items/", headers={"X-Token": "fake-super-secret-token", "X-Key": "invalid"} ) assert response.status_code == 400, response.text assert response.json() == {"detail": "X-Key header invalid"} @needs_py39 def test_get_invalid_second_header_users(client: TestClient): response = client.get( "/users/", headers={"X-Token": "fake-super-secret-token", "X-Key": "invalid"} )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 8.8K bytes - Viewed (0) -
docs_src/dependencies/tutorial006_an.py
app = FastAPI() async def verify_token(x_token: Annotated[str, Header()]): if x_token != "fake-super-secret-token": raise HTTPException(status_code=400, detail="X-Token header invalid") async def verify_key(x_key: Annotated[str, Header()]): if x_key != "fake-super-secret-key": raise HTTPException(status_code=400, detail="X-Key header invalid") return x_key
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 643 bytes - Viewed (0) -
docs_src/dependencies/tutorial006_an_py39.py
app = FastAPI() async def verify_token(x_token: Annotated[str, Header()]): if x_token != "fake-super-secret-token": raise HTTPException(status_code=400, detail="X-Token header invalid") async def verify_key(x_key: Annotated[str, Header()]): if x_key != "fake-super-secret-key": raise HTTPException(status_code=400, detail="X-Key header invalid") return x_key
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 633 bytes - Viewed (0) -
docs_src/dependencies/tutorial012_an.py
from typing_extensions import Annotated async def verify_token(x_token: Annotated[str, Header()]): if x_token != "fake-super-secret-token": raise HTTPException(status_code=400, detail="X-Token header invalid") async def verify_key(x_key: Annotated[str, Header()]): if x_key != "fake-super-secret-key": raise HTTPException(status_code=400, detail="X-Key header invalid") return x_key
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 756 bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial006_an.py
"/items/", headers={"X-Token": "fake-super-secret-token", "X-Key": "invalid"} ) assert response.status_code == 400, response.text assert response.json() == {"detail": "X-Key header invalid"} def test_get_valid_headers(): response = client.get( "/items/", headers={ "X-Token": "fake-super-secret-token", "X-Key": "fake-super-secret-key", }, )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 5K bytes - Viewed (0) -
docs_src/dependencies/tutorial012_an_py39.py
from typing_extensions import Annotated async def verify_token(x_token: Annotated[str, Header()]): if x_token != "fake-super-secret-token": raise HTTPException(status_code=400, detail="X-Token header invalid") async def verify_key(x_key: Annotated[str, Header()]): if x_key != "fake-super-secret-key": raise HTTPException(status_code=400, detail="X-Key header invalid") return x_key
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 756 bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/FakeDns.kt
} fun assertRequests(vararg expectedHosts: String?) { assertThat(requestedHosts).containsExactly(*expectedHosts) requestedHosts.clear() } /** Allocates and returns `count` fake IPv4 addresses like [255.0.0.100, 255.0.0.101]. */ fun allocate(count: Int): List<InetAddress> { val from = nextAddress nextAddress += count return (from until nextAddress) .map {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.6K bytes - Viewed (0) -
docs_src/response_cookies/tutorial001.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")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 344 bytes - Viewed (0) -
tests/test_tutorial/test_response_cookies/test_tutorial001.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jul 09 18:06:12 UTC 2020 - 403 bytes - Viewed (0)