From: jaystone776 Date: Sun, 28 Jan 2024 18:21:02 +0000 (+0800) Subject: 🌐 Add Chinese translation for `docs/zh/docs/advanced/testing-events.md` (#3818) X-Git-Tag: 0.109.1~46 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eaf394d3646aef4e73eaf84168506a9dc78f76d1;p=thirdparty%2Ffastapi%2Ffastapi.git 🌐 Add Chinese translation for `docs/zh/docs/advanced/testing-events.md` (#3818) --- diff --git a/docs/zh/docs/advanced/testing-events.md b/docs/zh/docs/advanced/testing-events.md new file mode 100644 index 0000000000..222a67c8cf --- /dev/null +++ b/docs/zh/docs/advanced/testing-events.md @@ -0,0 +1,7 @@ +# 测试事件:启动 - 关闭 + +使用 `TestClient` 和 `with` 语句,在测试中运行事件处理器(`startup` 与 `shutdown`)。 + +```Python hl_lines="9-12 20-24" +{!../../../docs_src/app_testing/tutorial003.py!} +```