direkt-vermittlung-de/tests/unit/test_routing.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

28 lines
No EOL
804 B
Python

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"