fastapi/docs/zh/docs/advanced/testing-events.md

228 B

测试事件:启动 - 关闭

使用 TestClientwith 语句,在测试中运行事件处理器(startupshutdown)。

{!../../../docs_src/app_testing/tutorial003.py!}