- Sort Score
- Num 10 results
- Language All
Results 1 - 3 of 3 for test_stringified_annotation (0.71 seconds)
-
tests/test_stringified_annotation_dependency.py
Sebastián RamÃrez <******@****.***> 1766006759 -0800
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 2.2K bytes - Click Count (0) -
tests/test_stringified_annotation_dependency_py314.py
from fastapi import Depends, FastAPI from fastapi.testclient import TestClient from .utils import needs_py314 if TYPE_CHECKING: # pragma: no cover class DummyUser: ... @needs_py314 def test_stringified_annotation(): # python3.14: Use forward reference without "from __future__ import annotations" async def get_current_user() -> DummyUser | None: return None app = FastAPI()Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 04 13:49:44 GMT 2026 - 711 bytes - Click Count (0) -
tests/test_stringified_annotations_simple.py
from fastapi.testclient import TestClient from .utils import needs_py310 class Dep: def __call__(self, request: Request): return "test" @needs_py310 def test_stringified_annotations(): app = FastAPI() client = TestClient(app) @app.get("/test/") def call(test: Annotated[str, Depends(Dep())]): return {"test": test} response = client.get("/test")Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 545 bytes - Click Count (0)