mirror of https://github.com/tiangolo/fastapi.git
✅ Tweak tests
This commit is contained in:
parent
6b68de7f42
commit
8aae553b89
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Reference in New Issue