Mobilizon-Reshare-condividi.../tests/models/test_notification.py

13 lines
448 B
Python
Raw Normal View History

2021-05-31 01:11:50 +02:00
import pytest
from mobilizon_reshare.models.notification import Notification, NotificationStatus
2021-05-31 01:11:50 +02:00
@pytest.mark.asyncio
async def test_notification_create(notification_model_generator):
notification_model = notification_model_generator()
await notification_model.save()
notification_db = await Notification.all().first()
assert notification_db.status == NotificationStatus.WAITING
assert notification_db.message == "message_1"