Skip to content

Commit 4c0ebf1

Browse files
authored
Fix FastAPI Schemathesis integration (#86)
1 parent 328c8b6 commit 4c0ebf1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

microbootstrap/bootstrappers/fastapi.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ class FastApiBootstrapper(
3030
application_type = fastapi.FastAPI
3131

3232
@contextlib.asynccontextmanager
33-
async def _lifespan_manager(self, _: fastapi.FastAPI) -> typing.AsyncIterator[dict[str, typing.Any]]:
33+
async def _lifespan_manager(self, _: fastapi.FastAPI) -> typing.AsyncIterator[None]:
3434
try:
3535
self.console_writer.print_bootstrap_table()
36-
yield {}
36+
yield
3737
finally:
3838
self.teardown()
3939

4040
@contextlib.asynccontextmanager
41-
async def _wrapped_lifespan_manager(self, app: fastapi.FastAPI) -> typing.AsyncIterator[dict[str, typing.Any]]:
41+
async def _wrapped_lifespan_manager(self, app: fastapi.FastAPI) -> typing.AsyncIterator[None]:
4242
assert self.application_config.lifespan # noqa: S101
4343
async with self._lifespan_manager(app), self.application_config.lifespan(app):
44-
yield {}
44+
yield None
4545

4646
def bootstrap_before(self) -> dict[str, typing.Any]:
4747
return {

0 commit comments

Comments
 (0)