feat(in-transit-transfer): inbound/outbound 幂等重命名与解析用途分层
- receipt→inbound 三件套改名(回调桥/文件门禁/触发服务),回调链幂等去重,迁移 tt14 同步台账键与测试基建 - 库存解析用途分层 onhand/inbound/outbound(迁移 tt15):解析档案、文件存储与下载名按用途隔离,管理端表单同步 - 「成熟」概念退役(迁移 tt16):数据无成熟属性,日期边界由调用方入参严格判定 - backlog 新增重解析服务,在途重识别投影 processing,EML 父项不再停留处理中 - 收料 RPA 回调/归档/排程链路同步改名挂点,运维脚本复位假完成状态 - 文档随批:ADR 0003 模块边界决策、10-15/10-16 计划与设计、调拨文档族与 demand/tec/funclist - 同步 chat/errors 文案四语言、调拨前端卡片与 e2e、测试全家
This commit is contained in:
1 parent
43dceaf027
commit
8102a1fe44
151 files changed
+8057
-2382
No files matched your search
@@ -1,8 +1,8 @@
|
||||
"""在途调拨测试固定夹具:时钟、收料文件样例、外部替身与数据库隔离。
|
||||
"""在途调拨测试固定夹具:时钟、入站文件样例、外部替身与数据库隔离。
|
||||
|
||||
用途:为 tests/services/in_transit_transfer 提供与 TDD 文档一致的固定输入
|
||||
(fixed_clock 默认 2026-08-06 09:00:00+08:00、dbs/crane ready 文件、
|
||||
same_day_receipt_file),并组装 FakeCapabilityClient/FakeRPA/FakeWeCom。
|
||||
same_day_inbound_file),并组装 FakeCapabilityClient/FakeRPA/FakeWeCom。
|
||||
依赖:根 tests/conftest 的 app fixture(SQLite 内存库)、fakes 模块。
|
||||
逻辑:纯单元用例(marker pure_unit 且未请求 app)不创建 Flask/DB;
|
||||
请求 transfer_db 的用例复用 app fixture 的 create_all/drop_all 隔离。
|
||||
@@ -34,22 +34,6 @@ def _stub_doc_sequence(monkeypatch):
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _pin_maturity_lag_legacy(request):
|
||||
"""在途套件钉成熟滞后=1(T+1)。
|
||||
|
||||
用途:存量夹具生态按 T+1 语义构建(fixed_clock 业务日 2026-08-06、收料日期
|
||||
2026-08-05=T-1);生产默认 T+2(settings IN_TRANSIT_TRANSFER_MATURITY_
|
||||
LAG_DAYS=2)的边界行为由 test_matching_service / test_date_policy 专项
|
||||
用例显式覆盖,不被本钉值掩盖。
|
||||
逻辑:仅对已请求 app 的用例钉值(request.fixturenames 判定),pure_unit 用例
|
||||
(如 test_date_policy)不触碰 Flask,继续走 date_policy 的无上下文回退。
|
||||
"""
|
||||
if "app" in getattr(request, "fixturenames", []):
|
||||
app = request.getfixturevalue("app")
|
||||
app.config["IN_TRANSIT_TRANSFER_MATURITY_LAG_DAYS"] = 1
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _seed_default_transfer_type(request):
|
||||
"""默认启用类型配置种子(autouse,出生翻转后匹配创建必填且配置驱动)。
|
||||
|
||||
Reference in new issue
Block a user