mirror of https://github.com/tiangolo/fastapi.git
🌐 Add Chinese translation for `docs/zh/docs/advanced/testing-events.md` (#3818)
This commit is contained in:
parent
92cf191f1f
commit
eaf394d364
|
|
@ -0,0 +1,7 @@
|
||||||
|
# 测试事件:启动 - 关闭
|
||||||
|
|
||||||
|
使用 `TestClient` 和 `with` 语句,在测试中运行事件处理器(`startup` 与 `shutdown`)。
|
||||||
|
|
||||||
|
```Python hl_lines="9-12 20-24"
|
||||||
|
{!../../../docs_src/app_testing/tutorial003.py!}
|
||||||
|
```
|
||||||
Loading…
Reference in New Issue