Commit Graph

1 Commits

Author SHA1 Message Date
Chiguyong e0a22e0447 test: 补充 3 个高优先级测试缺口 (52 tests)
U2: tests/unit/llm/test_migration.py (6 tests)
  覆盖 migrate_api_keys_to_secrets 的 happy path/idempotent/empty/
  source missing/write failure/dual source 场景。mock SecretsStore 隔离 I/O。

U3: tests/unit/test_memory_models.py (31 tests)
  覆盖 EpisodeModel + ExperienceModel 的列类型/默认值/边界值。
  源文件是 SQLAlchemy ORM 模型(非 Pydantic),按 ORM 等价测试。
  跳过需 DB 连接的函数。

U4: tests/unit/test_chat_ws_routes.py (15 tests)
  覆盖 WebSocket /api/v1/chat/ws/{session_id} 的连接/认证/消息
  (ping/cancel/message/confirmation)/隔离/清理。mock _handle_chat_message。

所有测试通过,ruff 干净。预先存在的 OpenAICompatibleProvider 构造签名
和硬编码路径失败与本次改动无关。
2026-07-06 23:13:26 +08:00