test: 建立单元测试基座
- 新增 unittest tests 基座,覆盖 appconfig 与 db 纯逻辑 - 增加 excel/prompts 未实现模块的契约占位测试 - 补强 config.json 对 *_token 与 *_password 的敏感字段拦截 - 更新任务看板、当前状态、API 合约和进度记录
This commit is contained in:
+3
-1
@@ -109,7 +109,9 @@ def _assert_no_secrets(config):
|
||||
if isinstance(value, dict):
|
||||
for key, child in value.items():
|
||||
lowered = str(key).lower()
|
||||
if lowered in SECRET_FIELD_NAMES or lowered.endswith("_key"):
|
||||
if lowered in SECRET_FIELD_NAMES or lowered.endswith(
|
||||
("_key", "_token", "_password")
|
||||
):
|
||||
raise ConfigError(
|
||||
f"config.json 不允许保存敏感字段: {'.'.join(path + [str(key)])}"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user