28 lines
No EOL
804 B
Python
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" |