From dd6d2fce2b92daad763506363077384d6ab5bf7f Mon Sep 17 00:00:00 2001 From: Yaojia Wang Date: Wed, 8 Jul 2026 11:29:27 +0200 Subject: [PATCH] =?UTF-8?q?docs(test):=20=E6=9B=B4=E6=AD=A3=20K1=20E2E=20d?= =?UTF-8?q?ocstring=20=E4=BE=9D=E8=B5=96=E5=90=8D=E4=B8=BA=20=5Fhttp=5Fcli?= =?UTF-8?q?ent=EF=BC=88CR-H2=20=E6=94=B6=E5=B0=BE=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_k1_kimi_oauth_e2e.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_k1_kimi_oauth_e2e.py b/tests/test_k1_kimi_oauth_e2e.py index 1f7d7f1..9fc865e 100644 --- a/tests/test_k1_kimi_oauth_e2e.py +++ b/tests/test_k1_kimi_oauth_e2e.py @@ -36,7 +36,8 @@ auth.kimi.com / api.kimi.com 一次都不碰。 坑(见 memory/gotchas): - 后台 work 自建 http 走**模块级** `routers.kimi_oauth._default_http_client()`(非 dep)—— 须 monkeypatch 它指到同一 scripted fake(端点 device-auth call[0] + work poll call[1..] - 顺序共享);端点 device-auth 走 `http` dep,再 override `_default_http_client` dep。 + 顺序共享);端点 device-auth 走 `http` dep(现为 `_http_client` 生成器依赖,CR-H2), + 再 override `_http_client` dep。 - 真 pg 持久化:**不** monkeypatch `SqlCredentialStore`(让真 store 落库),override `get_session_factory`→`e2e_sm`(同测试 engine/loop)使后台 work 用真 session 写库。 - monkeypatch `routers.kimi_oauth.asyncio.sleep`→no-op(不真等 interval 秒)。