]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
🌐 Add Chinese translation for `docs/zh/docs/advanced/testing-events.md` (#3818)
authorjaystone776 <jilei776@gmail.com>
Sun, 28 Jan 2024 18:21:02 +0000 (02:21 +0800)
committerGitHub <noreply@github.com>
Sun, 28 Jan 2024 18:21:02 +0000 (13:21 -0500)
docs/zh/docs/advanced/testing-events.md [new file with mode: 0644]

diff --git a/docs/zh/docs/advanced/testing-events.md b/docs/zh/docs/advanced/testing-events.md
new file mode 100644 (file)
index 0000000..222a67c
--- /dev/null
@@ -0,0 +1,7 @@
+# 测试事件:启动 - 关闭
+
+使用 `TestClient` 和 `with` 语句,在测试中运行事件处理器(`startup` 与 `shutdown`)。
+
+```Python hl_lines="9-12  20-24"
+{!../../../docs_src/app_testing/tutorial003.py!}
+```