27 lines
701 B
Python
27 lines
701 B
Python
from datetime import datetime, timezone
|
|
from uuid import uuid4
|
|
|
|
from v1.inbox_messages.schemas import (
|
|
InboxMessageResponse,
|
|
InboxMessageStatus,
|
|
InboxMessageType,
|
|
)
|
|
|
|
|
|
def test_inbox_message_response_schema() -> None:
|
|
msg_id = uuid4()
|
|
response = InboxMessageResponse(
|
|
id=msg_id,
|
|
recipient_id=uuid4(),
|
|
sender_id=uuid4(),
|
|
message_type=InboxMessageType.CALENDAR,
|
|
schedule_item_id=uuid4(),
|
|
content="Join my calendar",
|
|
is_read=False,
|
|
status=InboxMessageStatus.PENDING,
|
|
created_at=datetime.now(timezone.utc),
|
|
)
|
|
|
|
assert response.message_type.value == "calendar"
|
|
assert response.status.value == "pending"
|