- 新增 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>
11 lines
294 B
Python
11 lines
294 B
Python
"""表名契约快照:守护全部数据库表名(DB_PREFIX + 模块)不变。"""
|
|
import pytest
|
|
|
|
from tests.contract.helpers import collect_tables, compare_snapshot
|
|
|
|
pytestmark = pytest.mark.contract
|
|
|
|
|
|
def test_tablenames_snapshot():
|
|
compare_snapshot("tables.json", collect_tables())
|