- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 1,606 for response (0.1 sec)
-
tests/test_tutorial/test_security/test_tutorial005_an_py39.py
assert response.status_code == 400, response.text assert response.json() == {"detail": "Incorrect username or password"} @needs_py39 def test_no_token(client: TestClient): response = client.get("/users/me") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" @needs_py39 def test_token(client: TestClient):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 16.3K bytes - Viewed (0) -
tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002_py310.py
def test_create_item(client: TestClient) -> None: response = client.post("/items/", json={"name": "Foo"}) assert response.status_code == 200, response.text assert response.json() == {"name": "Foo", "description": None} @needs_py310 def test_read_items(client: TestClient) -> None: response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [ {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 25 19:10:22 UTC 2023 - 4.9K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005.py
def test_no_token(): response = client.get("/users/me") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" def test_token(): access_token = get_access_token(scope="me") response = client.get(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 15.4K bytes - Viewed (0) -
tests/test_security_http_bearer_optional.py
response = client.get("/users/me", headers={"Authorization": "Basic notreally"}) assert response.status_code == 200, response.text assert response.json() == {"msg": "Create an account first"} def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0",
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_security_oauth2_authorization_code_bearer_description.py
client = TestClient(app) def test_no_token(): response = client.get("/items") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} def test_incorrect_token(): response = client.get("/items", headers={"Authorization": "Non-existent testtoken"}) assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.4K bytes - Viewed (0) -
tests/test_security_oauth2_password_bearer_optional.py
client = TestClient(app) def test_no_token(): response = client.get("/items") assert response.status_code == 200, response.text assert response.json() == {"msg": "Create an account first"} def test_token(): response = client.get("/items", headers={"Authorization": "Bearer testtoken"}) assert response.status_code == 200, response.text assert response.json() == {"token": "testtoken"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
docs/em/docs/advanced/additional-responses.md
/// ๐ ๐ช ๐ฃ ๐ ๐จ, โฎ๏ธ ๐ ๐ ๐, ๐ ๐, ๐, โ๏ธ. ๐ ๐ ๐จ ๐ ๐ ๐ ๐, ๐ซ ๐ ๐ ๐ ๏ธ ๐ฉบ. โ๏ธ ๐ ๐ ๐จ ๐ โ๏ธ โ ๐ญ ๐ ๐จ `Response` ๐ `JSONResponse` ๐, โฎ๏ธ ๐ ๐ ๐ & ๐. ## ๐ ๐จ โฎ๏ธ `model` ๐ ๐ช ๐ถโโ๏ธ ๐ *โก ๐ ๏ธ ๐จโ๐จ* ๐ข `responses`. โซ๏ธ ๐จ `dict`, ๐ ๐ ๐ ๐ ๐จ, ๐ `200`, & ๐ฒ ๐ `dict`โ โฎ๏ธ โน ๐ ๐ซ. ๐ ๐ ๐จ `dict`โ ๐ช โ๏ธ ๐ `model`, โ Pydantic ๐ท, ๐ `response_model`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.8K bytes - Viewed (0) -
docs/features/interceptors.md
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 06 02:19:09 UTC 2022 - 8.1K bytes - Viewed (0) -
docs/pt/docs/advanced/additional-responses.md
Vocรช pode declarar um `response_model`, utilizando o cรณdigo de status padrรฃo `200` (ou um customizado caso vocรช precise), e depois adicionar informaรงรตes adicionais para esse mesmo retorno em `responses`, diretamente no esquema OpenAPI. O **FastAPI** manterรก as informaรงรตes adicionais do `responses`, e combinarรก com o esquema JSON do seu modelo.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.3K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial003.py
assert response.status_code == 400, response.text assert response.json() == {"detail": "Incorrect username or password"} def test_login_incorrect_username(): response = client.post("/token", data={"username": "foo", "password": "secret"}) assert response.status_code == 400, response.text assert response.json() == {"detail": "Incorrect username or password"} def test_no_token(): response = client.get("/users/me")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 8K bytes - Viewed (0)