重组为 backend/clients/docs 三层结构,并清理 git 污染。

将后端迁入 backend/,完善根目录 .gitignore,删除误提交的 .mypy_cache 缓存文件。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Kevin
2026-05-21 16:02:25 +08:00
parent 6bc6801df9
commit 1af442481e
142 changed files with 175 additions and 212 deletions

View File

@@ -0,0 +1,20 @@
"""百度凭据:仅从环境变量 BAIDU_APP_ID / BAIDU_API_KEY / BAIDU_SECRET_KEY 读入。"""
import os
from unittest.mock import patch
from app.config import Settings
def test_speech_creds_from_baidu_env_triplet() -> None:
extra = {
"BAIDU_APP_ID": "app-x",
"BAIDU_API_KEY": "key-x",
"BAIDU_SECRET_KEY": "sec-x",
}
with patch.dict(os.environ, extra, clear=False):
s = Settings()
assert s.baidu_speech_app_id == "app-x"
assert s.baidu_speech_api_key == "key-x"
assert s.baidu_speech_secret_key == "sec-x"
assert s.baidu_speech_configured is True