Skip to content

Commit 6d3cadd

Browse files
author
Andrei Neagu
committed
refactor
1 parent 84da950 commit 6d3cadd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/service-library/tests/fastapi/test_lifespan_utils.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@
88

99

1010
async def test_multiple_lifespan_managers(capsys: pytest.CaptureFixture):
11-
async def database_lifespan(_: FastAPI) -> AsyncIterator[State]:
11+
async def database_lifespan(app: FastAPI) -> AsyncIterator[State]:
12+
_ = app
1213
print("setup DB")
13-
yield {}
14+
yield State()
1415
print("shutdown DB")
1516

16-
async def cache_lifespan(_: FastAPI) -> AsyncIterator[State]:
17+
async def cache_lifespan(app: FastAPI) -> AsyncIterator[State]:
18+
_ = app
1719
print("setup CACHE")
18-
yield {}
20+
yield State()
1921
print("shutdown CACHE")
2022

2123
app = FastAPI(lifespan=combine_lifespans(database_lifespan, cache_lifespan))

0 commit comments

Comments
 (0)