chore(AdminCost): 移除 COS4 数据结构迁移的一次性脚本与参考资料

This commit is contained in:
lianjianwei2024
2026-11-01 15:27:27 +08:00
parent 386e1ad624
commit f0b1033b12
69 changed files with 5936 additions and 42964 deletions

View File

@@ -70,12 +70,13 @@ def test_legacy_manual_project_guards_and_delete(server):
assert _item(server, sid) is None
def test_legacy_manual_project_supply_source_restores(server):
def test_legacy_manual_project_supply_source_rejected(server):
"""决策 242(2026-10-30 主人定):同名导入一律拒绝——旧「手工工程同名补传源文件
恢复正常工程」通道退役。手工工程要上源文件数据:先删手工工程,再按源文件新导。"""
sid = _legacy_manual(server, "旧手工工程B")
p = make_cos4(str(server["src_dir"] / "manualB.cos4"), "旧手工工程B", [CAM], [LME_CAM])
up = _upload(server, p, "manualB.cos4")
a = post(server, "/api/audit", dict(AUDIT_BASE, path=up, name="旧手工工程B"))
assert a["ok"] is True and a["session_id"] == sid, a
assert a["ok"] is False and "名字重复" in a["msg"] and "请修改名称" in a["msg"], a
it = _item(server, sid)
assert it is not None and it["manual"] is False and it["src_name"]
assert get(server, "/api/session/rows", session_id=sid, type="bill")["total"] > 0
assert it is not None and it["manual"] is True # 手工工程原样未动