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

205 B

测试事件:启动 - 关闭

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

{* ../../docs_src/app_testing/tutorial003.py hl[9:12,20:24] *}