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
28
tests/unit/test_routing.py
Normal file
28
tests/unit/test_routing.py
Normal 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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue