2 Commits
Author SHA1 Message Date
ClaudeandClaude 13853daa4a feat(phase6): 测试补全 + 集成测试 + repository 落地示范
- tests/unit/modules/test_repository.py:base_repository 在 SQLite 内存库的 CRUD 测试
- tests/integration/api/test_smoke.py:登录链路 / 只读接口 / 未授权拦截(标记 integration,默认跳过)
- conftest 提供 sqlite_db(隔离 DB)与 app/client/admin_headers(集成)fixture
- pytest.ini 默认跳过 integration,Makefile test-integration 可显式运行
- 修复 base_repository.get_by_id/get_by_ids 对字符串 ID 的兼容(URL 路径参数)
- 示范 modules/system/level service 改用 level_repo,CRUD 全链路实测通过

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-07 10:21:41 +08:00
ClaudeandClaude fe1d191e55 feat(phase0): 工具链 + 契约快照测试,修复既有 bug
- 新增 pyproject.toml / pytest.ini / Makefile / requirements-dev.txt
- 新增 3 个契约快照测试(路由167/权限串148/表名25),守护前端与数据契约
- 修复 requirements.txt UTF-16 编码导致 pip 无法解析
- 修复 JobLog 未继承 Base 导致无法映射(fastapi_job_log 表缺失于 metadata)
- 修复 base_model.to_dict() 未序列化纯 date 类型(birthday 等导致 500)
- 补充 .gitignore(.env/缓存/上传目录)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-07 09:57:33 +08:00