- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 30 for Calico (0.09 sec)
-
tests/test_tutorial/test_security/test_tutorial004.py
alice_user_data = { "username": "alice", "full_name": "Alice Wonderson", "email": "alice@example.com", "hashed_password": mod.get_password_hash("secretalice"), "disabled": True, } with patch.dict(f"{mod.__name__}.fake_users_db", {"alice": alice_user_data}): access_token = get_access_token( username="alice", password="secretalice", client=client )Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 13.3K bytes - Viewed (0) -
tests/test_dependency_security_overrides.py
app = FastAPI() def get_user(required_scopes: SecurityScopes): return "john", required_scopes.scopes def get_user_override(required_scopes: SecurityScopes): return "alice", required_scopes.scopes def get_data(): return [1, 2, 3] def get_data_override(): return [3, 4, 5] @app.get("/user") def read_user(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 1.4K bytes - Viewed (1) -
docs_src/security/tutorial003_py39.py
"full_name": "John Doe", "email": "******@****.***", "hashed_password": "fakehashedsecret", "disabled": False, }, "alice": { "username": "alice", "full_name": "Alice Wonderson", "email": "alice@example.com", "hashed_password": "fakehashedsecret2", "disabled": True, }, } app = FastAPI() def fake_hash_password(password: str):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 2.4K bytes - Viewed (0) -
tests/test_schema_compat_pydantic_v2.py
@app.get("/users") async def get_user() -> User: return {"username": "alice", "role": "admin"} client = TestClient(app) return client @needs_py310 def test_get(client: TestClient): response = client.get("/users") assert response.json() == {"username": "alice", "role": "admin"} @needs_py310 def test_openapi_schema(client: TestClient):Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 2.7K bytes - Viewed (0) -
tests/test_tutorial/test_path_params/test_tutorial001.py
from docs_src.path_params.tutorial001_py39 import app client = TestClient(app) @pytest.mark.parametrize( ("item_id", "expected_response"), [ (1, {"item_id": "1"}), ("alice", {"item_id": "alice"}), ], ) def test_get_items(item_id, expected_response): response = client.get(f"/items/{item_id}") assert response.status_code == 200, response.text assert response.json() == expected_response
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 3.9K bytes - Viewed (0) -
tests/test_tutorial/test_path_params/test_tutorial003.py
client = TestClient(app) @pytest.mark.parametrize( ("user_id", "expected_response"), [ ("me", {"user_id": "the current user"}), ("alice", {"user_id": "alice"}), ], ) def test_get_users(user_id: str, expected_response: dict): response = client.get(f"/users/{user_id}") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 4.6K bytes - Viewed (0) -
docs/pt/docs/tutorial/response-model.md
O editor, mypy e outras ferramentas não reclamarão disso porque, em termos de digitação, `UserIn` é uma subclasse de `BaseUser`, o que significa que é um tipo *válido* quando o que é esperado é qualquer coisa que seja um `BaseUser`. ### Filtragem de dados FastAPI { #fastapi-data-filtering }Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 17.3K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial007.py
assert response.json() == {"detail": "Not authenticated"} def test_security_http_basic_invalid_username(client: TestClient): response = client.get("/users/me", auth=("alice", "swordfish")) assert response.status_code == 401, response.text assert response.json() == {"detail": "Incorrect username or password"} assert response.headers["WWW-Authenticate"] == "Basic"
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 3.2K bytes - Viewed (0) -
docs/es/docs/how-to/custom-request-and-route.md
Pero este ejemplo sigue siendo válido y muestra cómo interactuar con los componentes internos. /// También podemos usar este mismo enfoque para acceder al request body en un manejador de excepciones.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 16:33:45 UTC 2025 - 5K bytes - Viewed (0) -
docs/pt/docs/tutorial/metadata.md
{* ../../docs_src/metadata/tutorial004_py39.py hl[3:16,18] *} Observe que você pode usar Markdown dentro das descrições. Por exemplo, "login" será exibido em negrito (**login**) e "fancy" será exibido em itálico (_fancy_). /// tip | Dica Você não precisa adicionar metadados para todas as tags que você usa. /// ### Use suas tags { #use-your-tags }Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 6.3K bytes - Viewed (0)