- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for setItem (0.51 sec)
-
tests/test_response_change_status_code.py
from fastapi import Depends, FastAPI, Response from fastapi.testclient import TestClient app = FastAPI() async def response_status_setter(response: Response): response.status_code = 201 async def parent_dep(result=Depends(response_status_setter)): return result @app.get("/", dependencies=[Depends(parent_dep)]) async def get_main(): return {"msg": "Hello World"} client = TestClient(app)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Apr 08 04:37:38 GMT 2020 - 589 bytes - Viewed (0)