test: 静态资源测试改走 /static(与 56a2ff8 统一挂载一致)

This commit is contained in:
lhl
2026-09-12 14:36:08 +08:00
parent 2ec347d905
commit 0f4b34f46f
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -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
+3 -3
View File
@@ -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):