mirror of https://github.com/tiangolo/fastapi.git
Refactor route handlers to be asynchronous and prevent coverage issues
This commit is contained in:
parent
a17f4c2d62
commit
1183114f3a
|
|
@ -30,13 +30,13 @@ app = FastAPI(
|
||||||
|
|
||||||
|
|
||||||
@app.get("/route1")
|
@app.get("/route1")
|
||||||
def route1():
|
async def route1():
|
||||||
return "test"
|
pass # pragma: no cover
|
||||||
|
|
||||||
|
|
||||||
@app.get("/route2")
|
@app.get("/route2")
|
||||||
def route2():
|
async def route2():
|
||||||
return "test"
|
pass # pragma: no cover
|
||||||
|
|
||||||
|
|
||||||
client = TestClient(app)
|
client = TestClient(app)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue