From 0f4b34f46f50acb2f1df15415d1ef7c820c4c78a Mon Sep 17 00:00:00 2001 From: lhl Date: Sat, 12 Sep 2026 14:36:08 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E9=9D=99=E6=80=81=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=94=B9=E8=B5=B0=20/static=EF=BC=88?= =?UTF-8?q?=E4=B8=8E=2056a2ff8=20=E7=BB=9F=E4=B8=80=E6=8C=82=E8=BD=BD?= =?UTF-8?q?=E4=B8=80=E8=87=B4=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_frontend_audit_fixes.py | 6 +++--- tests/test_progress_e2e.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_frontend_audit_fixes.py b/tests/test_frontend_audit_fixes.py index 7e81313..29841bf 100644 --- a/tests/test_frontend_audit_fixes.py +++ b/tests/test_frontend_audit_fixes.py @@ -87,8 +87,8 @@ def test_error_role_persisted(tmp_path): def test_chat_state_js_route(client): - """/chat_state.js 静态路由返回 JS(前端模块可加载,§4.5)。""" - r = client.get("/chat_state.js") + """/static/chat_state.js 静态资源可加载(前端模块,§4.5;现统一挂载 /static)。""" + r = client.get("/static/chat_state.js") assert r.status_code == 200 - assert "application/javascript" in r.headers["content-type"] + assert "javascript" in r.headers["content-type"] assert "GenesisState" in r.text or "autoBindProject" in r.text diff --git a/tests/test_progress_e2e.py b/tests/test_progress_e2e.py index 068e301..2c57be1 100644 --- a/tests/test_progress_e2e.py +++ b/tests/test_progress_e2e.py @@ -54,10 +54,10 @@ def test_ws_progress_second_emit_after_disconnect(tmp_path): def test_static_chat_ws_served(tmp_path): - # 覆盖 app.py 中 /chat_ws.js 与 /chat_state.js 端点 + # 覆盖 /static 下 chat_ws.js / chat_state.js 静态资源(现统一挂载 /static) client = _client(tmp_path) - assert client.get("/chat_ws.js").status_code == 200 - assert client.get("/chat_state.js").status_code == 200 + assert client.get("/static/chat_ws.js").status_code == 200 + assert client.get("/static/chat_state.js").status_code == 200 def test_projects_endpoints_noop(tmp_path):