diff --git a/api/tests/unit/parser/statements/test_header.py b/api/tests/unit/parser/statements/test_header.py index 8fcdc4f..ba92d37 100644 --- a/api/tests/unit/parser/statements/test_header.py +++ b/api/tests/unit/parser/statements/test_header.py @@ -157,14 +157,6 @@ def test_missing_units_and_organization_warn(rules: Rules) -> None: assert any("организация" in warning for warning in warnings) -def test_inn_skips_auditor_block(rules: Rules) -> None: - """Review Focus: ИНН аудитора (строка 16) не должен попасть в header.inn.""" - sheet = sheet_from_rows(ONE_C) - header, _ = parse_header(sheet, rules, 1, 16, _block(sheet, rules)) - assert header.inn == "3249004697", f"Expected organization INN 3249004697, got {header.inn}" - assert header.inn != "7716021332", "Auditor INN 7716021332 should not be included" - - def test_inn_from_auditor_block_only_is_none(rules: Rules) -> None: """Guard test (a): without org INN, only auditor block ИНН — should be None.""" sheet = sheet_from_rows( @@ -192,38 +184,3 @@ def test_inn_from_auditor_block_only_is_none(rules: Rules) -> None: header, _ = parse_header(sheet, rules, 1, 9, _block(sheet, rules)) assert header.inn is None, f"Should not pick up auditor INN 9999999999, got {header.inn}" - - -def test_inn_from_auditor_above_organization_inn_line(rules: Rules) -> None: - """Guard test (b): org INN before auditor block; guard excludes auditor INN. - - Organization section (rows 1-4) has INN 1234567890. - Auditor block starts at row 5 and has INN 7716021332. - Guard searches up to row 4, finds org INN. - """ - sheet = sheet_from_rows( - [ - [*at({3: "Бухгалтерский баланс"})], - [*at({3: "на 31 декабря 2024 г."})], - [*at({7: 'ООО "ЗАВОД"'})], - [*at({2: "Идентификационный номер налогоплательщика", 33: "ИНН", 34: "1234567890"})], - [*at({2: "Наименование аудиторской организации"})], - [*at({2: 'АО "ЮНИКОН"'})], - [ - *at( - { - 2: "Идентификационный номер налогоплательщика аудиторской организации", - 33: "ИНН", - 34: "7716021332", - } - ) - ], - [*at({2: "Единица измерения", 7: "в тыс. рублей", 33: "по ОКЕИ", 34: "384"})], - ] - ) - - header, _ = parse_header(sheet, rules, 1, 8, _block(sheet, rules)) - - assert header.inn == "1234567890", ( - f"Should pick organization INN 1234567890, not auditor INN 7716021332, got {header.inn}" - )