release: Themiz — публичный срез 26.11.2026

This commit is contained in:
public-repo-gate
2026-11-26 04:34:08 -05:00
parent 86ea1998fe
commit 979528e135
30 changed files with 53514 additions and 48997 deletions
+23
View File
@@ -0,0 +1,23 @@
"""Ссылки на материалы дела по листам дела: карта .agent/context/listy-dela.json -> «л.д. N» у источника факта."""
import json
import faza_dokument as fd
FACT = {"tema": "Уведомление", "znachenie": "от 29.12.2025", "fail": "postuplenie/abc.JPG", "str": 1, "status": "ок"}
def test_fakt_s_listom(tmp_path):
assert "л.д. 89" in fd._fakt(0, FACT, {"abc.JPG": "89"})
def test_fakt_bez_karty():
assert "л.д." not in fd._fakt(0, FACT)
def test_karta_chitaetsya_i_bitaya_ne_valit(tmp_path):
path = tmp_path / ".agent" / "context"
path.mkdir(parents=True)
assert fd.listy_dela(tmp_path) == {}
(path / "listy-dela.json").write_text(json.dumps({"abc.JPG": 89}), encoding="utf-8")
assert fd.listy_dela(tmp_path) == {"abc.JPG": "89"}
(path / "listy-dela.json").write_text("{", encoding="utf-8")
assert fd.listy_dela(tmp_path) == {}