direkt-vermittlung-de/tests/acceptance/test_routing_rules.py
tegwick 11b862588f
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 2s
Complete DVD-WP-0002 main codebase TDD kickoff
2026-07-08 15:21:17 +02:00

20 lines
No EOL
686 B
Python

"""Acceptance tests for future routing-rules table (TDD red phase)."""
from datetime import UTC, datetime
import pytest
from dvd.domain.models import DocumentMetadata
@pytest.mark.asyncio
async def test_route_by_reference_prefix_from_rules_table() -> None:
"""ADR-001 follow-on: authority-specific rules should override doc_type defaults."""
meta = DocumentMetadata(
authorityId="DE-BY-001",
referenceNumber="FIN-2026-001",
docType="APPLICATION",
issuedAt=datetime(2026, 1, 15, tzinfo=UTC),
)
from dvd.adapters.routing_rules import route_document_with_rules
assert await route_document_with_rules(meta) == "DE-BY-001-FinanceTeam"