xiaozhi-esp32-server/main/xiaozhi-server/tests
Sakura-RanChen 0e0bf47f55 test: 添加 5 条核心链路测试 + 默认 mock 模式
参照 PR #3370 的整体结构,新增 STT/LLM/TTS/RAG/Memory 五个 test_*.py
覆盖关键链路。conftest.py 默认 mock 模式:

- PYTEST_CONFIG_FILE 指向单模块配置文件(不入库)
- RUN_LIVE_API_TESTS=1 走真请求(必须配齐密钥)
- 真实存在的第三方包(openai/httpx)保留,仅 patch httpx 网络层
- 装了一半会炸的本地模型(torch/funasr/modelscope)强制 shim
- mock load_config / init_service,避免触发远程 manager-api

mock 模式目标:dep-upgrade orchestrator / CI 不需要任何密钥即可跑通。
2026-09-17 15:17:10 +08:00
..
config 加配置合并函数测试,7 例 2026-09-02 22:24:35 +08:00
core 加意图/模型/记忆工厂测试,6 例 2026-09-02 22:24:35 +08:00
plugins_func 加插件包导入冒烟测试,1 例 2026-09-02 22:24:35 +08:00
__init__.py 加 Python 冒烟测试,验证 pytest 流水线 2026-09-02 22:24:35 +08:00
conftest.py test: 添加 5 条核心链路测试 + 默认 mock 模式 2026-09-17 15:17:10 +08:00
test_llm.py test: 添加 5 条核心链路测试 + 默认 mock 模式 2026-09-17 15:17:10 +08:00
test_memory.py test: 添加 5 条核心链路测试 + 默认 mock 模式 2026-09-17 15:17:10 +08:00
test_rag.py test: 添加 5 条核心链路测试 + 默认 mock 模式 2026-09-17 15:17:10 +08:00
test_smoke.py 加 Python 冒烟测试,验证 pytest 流水线 2026-09-02 22:24:35 +08:00
test_stt.py test: 添加 5 条核心链路测试 + 默认 mock 模式 2026-09-17 15:17:10 +08:00
test_tts.py test: 添加 5 条核心链路测试 + 默认 mock 模式 2026-09-17 15:17:10 +08:00