Tweak tests

This commit is contained in:
Sebastián Ramírez 2025-12-03 14:43:59 +01:00
parent 6b68de7f42
commit 8aae553b89
1 changed files with 5 additions and 4 deletions

View File

@ -7,16 +7,17 @@ from typing_extensions import Annotated
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)
class Dep:
def __call__(self, request: Request):
return "test"
@app.get("/test/")
def call(test: Annotated[str, Depends(Dep())]):
return {"test": test}