From c287839f49ccd0412353341ece94735c6f7a6fd8 Mon Sep 17 00:00:00 2001 From: Andrey Epifancev Date: Wed, 28 Oct 2026 16:49:35 +0400 Subject: [PATCH] =?UTF-8?q?AURORA-1652:=20=D1=82=D0=B5=D1=81=D1=82=20?= =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=20=D1=81=20=D0=BD=D0=BE?= =?UTF-8?q?=D0=BC=D0=B5=D1=80=D0=B0=D0=BC=D0=B8=20=D1=81=D1=82=D0=B0=D1=82?= =?UTF-8?q?=D0=B5=D0=B9;=20=D0=B2=20=D1=81=D0=BF=D0=B5=D0=BA=D0=B5=20?= =?UTF-8?q?=E2=80=94=20elimination=5Fmode=20=D0=B2=20=D0=BE=D1=82=D0=B2?= =?UTF-8?q?=D0=B5=D1=82=D0=B5=20=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BD=D0=B5=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- api/tests/test_elimination_rules.py | 3 +++ openspec/specs/consolidations-api/spec.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/api/tests/test_elimination_rules.py b/api/tests/test_elimination_rules.py index b73722a..5646e24 100644 --- a/api/tests/test_elimination_rules.py +++ b/api/tests/test_elimination_rules.py @@ -17,6 +17,8 @@ def _rule() -> SimpleNamespace: statement_type=StatementType.balance, rule_no=2, version_no=3, + article_1_line="1230", + article_2_line="1520", side_1="D", measure="closing", ) @@ -63,5 +65,6 @@ async def test_fixed_rules_use_version_number(monkeypatch: pytest.MonkeyPatch) - assert result.is_version_fixed is True assert result.version_no == rule.version_no assert [item.id for item in result.rules] == [rule.id] + assert (result.rules[0].article_1_line, result.rules[0].article_2_line) == ("1230", "1520") assert result.rules[0].company_1.accounts == [account_id] listed.assert_awaited_once_with(session, rule.version_no) diff --git a/openspec/specs/consolidations-api/spec.md b/openspec/specs/consolidations-api/spec.md index 7bf1ada..15004ba 100644 --- a/openspec/specs/consolidations-api/spec.md +++ b/openspec/specs/consolidations-api/spec.md @@ -298,7 +298,7 @@ SHALL возвращать объект `{version_no, is_version_fixed, rules}`: правила этой версии; правила других версий, в том числе более новых, MUST NOT попадать в ответ. Каждое правило SHALL содержать `id`, `rule_no`, `version_no`, `statement_type`, `article_1_line`, `article_2_line`, `side_1` (`D`/`K`), `measure` (`closing`/`turnover`), -`company_1`, `company_2`; каждая сторона SHALL содержать `accounts: UUID[]` и `excluded: UUID[]` до раскрытия иерархии +`company_1`, `company_2`; `elimination_mode` в ответ не входит (режим элиминации отдаёт `elimination-totals`). Каждая сторона SHALL содержать `accounts: UUID[]` и `excluded: UUID[]` до раскрытия иерархии счетов. Невидимая и несуществующая версия SHALL отвечать одинаковым 404 `NOT_FOUND`. #### Scenario: Правило с исключением