diff --git a/scripts/regression/stand_scenario.py b/scripts/regression/stand_scenario.py index cd94f3e..ddda2ff 100644 --- a/scripts/regression/stand_scenario.py +++ b/scripts/regression/stand_scenario.py @@ -29,6 +29,8 @@ from pathlib import Path MONEY = ("opening_debit", "opening_credit", "turnover_debit", "turnover_credit", "closing_debit", "closing_credit") PENDING_FILE = {"UPLOADED", "PROCESSING"} +# locator документов из OCR содержит id задания (file:.json;table:0) — в снимке заменяется +UUID_RE = re.compile(r"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}") TO_CONFIRM = {"RECOGNIZED", "NEEDS_CHECK"} @@ -218,7 +220,7 @@ def run_scenario(api: Api, sc: dict, ctx: dict, fixtures: Path, rep: Report, out sorted( [ {k: d.get(k) for k in ("document_type", "osv_account_code", "period_year", "period_quarter", "is_cumulative", "period_check", "counterparty_check", "locator", "issue_counts")} - | {"file": n, "status_after_recognition": d["status"]} + | {"file": n, "status_after_recognition": d["status"], "locator": UUID_RE.sub("", str(d["locator"]))} for n, d in docs ], key=lambda x: (x["file"], str(x["locator"])),