credentials 表为登录凭据唯一事实源(站点×登录方式,含 oauth/2FA);账号密码读写重定向凭据层并幂等迁移历史数据;TOTP 按 RFC6238 零依赖自实现,绑定需当前动态码校验;Key Escrow 防 MASTER_KEY 遗失;前端新增凭据库视图与账号 2FA 联动。64 pytest + 16 浏览器端到端验证通过。
12 lines
380 B
Python
12 lines
380 B
Python
"""pytest 全局配置:确保项目根在 sys.path
|
||
|
||
tests/ 无 __init__.py,pytest prepend 模式只会把 tests/ 加入 sys.path,
|
||
直接运行 `pytest` 时 import app 会失败(python -m pytest 因 cwd 入 path 才可用)。
|
||
此文件让两种运行方式行为一致。
|
||
"""
|
||
|
||
import sys
|
||
from pathlib import Path
|
||
|
||
sys.path.insert(0, str(Path(__file__).resolve().parent))
|