Complete DVD-WP-0002 main codebase TDD kickoff
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 2s

This commit is contained in:
tegwick 2026-07-08 15:21:17 +02:00
parent 945460b84e
commit 11b862588f
12 changed files with 135 additions and 5 deletions

View file

@ -0,0 +1,28 @@
from datetime import UTC, datetime
import pytest
from dvd.adapters.routing import route_document
from dvd.domain.models import DocumentMetadata
@pytest.mark.asyncio
async def test_route_notice_to_notice_team() -> None:
meta = DocumentMetadata(
authorityId="DE-BY-001",
referenceNumber="AZ-123",
docType="NOTICE",
issuedAt=datetime(2026, 1, 15, tzinfo=UTC),
)
assert await route_document(meta) == "DE-BY-001-NoticeTeam"
@pytest.mark.asyncio
async def test_route_default_team_for_other_doc_types() -> None:
meta = DocumentMetadata(
authorityId="DE-BY-001",
referenceNumber="AZ-456",
docType="APPLICATION",
issuedAt=datetime(2026, 1, 15, tzinfo=UTC),
)
assert await route_document(meta) == "DE-BY-001-DefaultTeam"