release: Евномия, новая версия, линейка юристов

This commit is contained in:
public-repo-gate
2026-10-19 17:43:00 +03:00
parent 067c6c2414
commit bf1edc117c
239 changed files with 245397 additions and 36598 deletions
+43
View File
@@ -0,0 +1,43 @@
import json
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
import priemka_check as pc # noqa: E402
def setup(tmp_path, monkeypatch, verdikt="ГОТОВ К ПОДАЧЕ", sec=100, report=True, codes=None):
case = tmp_path / "delo"
case.mkdir()
local = tmp_path / "priemka.local"
local.write_text(json.dumps({"case": str(case), "limit_s": 1800}), encoding="utf-8")
if report:
copy = tmp_path / "delo-priemka-20261008-0900"
out = copy / ".agent/next"
out.mkdir(parents=True)
(out / "priemka.json").write_text(json.dumps({
"verdikt": verdikt, "sekundy": sec,
"dokumenty": [{"md": "GOTOVO/a.md", "docx": "GOTOVO/a.docx", "draft": ".agent/drafts/a.md"}]}), encoding="utf-8")
monkeypatch.setattr(pc, "pribory", lambda c, d: codes or {"document_guard": 0, "final_document": 0, "verdict_check": 0})
return local
def test_green(tmp_path, monkeypatch):
assert pc.check(setup(tmp_path, monkeypatch)) == []
def test_late(tmp_path, monkeypatch):
assert any("время" in p for p in pc.check(setup(tmp_path, monkeypatch, sec=1801)))
def test_not_ready(tmp_path, monkeypatch):
assert any("вердикт" in p for p in pc.check(setup(tmp_path, monkeypatch, verdikt="ТРЕБУЕТ ПРАВОК")))
def test_no_report(tmp_path, monkeypatch):
assert any("нет priemka.json" in p for p in pc.check(setup(tmp_path, monkeypatch, report=False)))
def test_red_instrument(tmp_path, monkeypatch):
local = setup(tmp_path, monkeypatch, codes={"document_guard": 1})
assert any("приборы" in p for p in pc.check(local))