20 lines
No EOL
686 B
Python
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" |