Complete DVD-WP-0002 main codebase TDD kickoff
This commit is contained in:
parent
945460b84e
commit
11b862588f
12 changed files with 135 additions and 5 deletions
20
tests/acceptance/test_routing_rules.py
Normal file
20
tests/acceptance/test_routing_rules.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
"""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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue