deploy-fix2
Some checks failed
Deploy on push / deploy (push) Failing after 5s

This commit is contained in:
2025-07-25 01:17:23 +03:00
parent ff2e5b6735
commit fed6d51af0
5 changed files with 203 additions and 2 deletions

View File

@@ -0,0 +1,40 @@
import pytest
from orm.notification import (
NotificationStatus,
NotificationKind,
NotificationEntity,
NotificationAction,
)
def test_notification_status():
"""Тестирование перечисления статусов уведомлений."""
assert NotificationStatus.UNREAD == NotificationStatus.from_string("UNREAD")
assert NotificationStatus.READ == NotificationStatus.from_string("READ")
with pytest.raises(ValueError):
NotificationStatus.from_string("INVALID_STATUS")
def test_notification_kind():
"""Тестирование перечисления типов уведомлений."""
assert NotificationKind.COMMENT == NotificationKind.from_string("COMMENT")
assert NotificationKind.MENTION == NotificationKind.from_string("MENTION")
with pytest.raises(ValueError):
NotificationKind.from_string("INVALID_KIND")
def test_notification_entity():
"""Тестирование перечисления сущностей уведомлений."""
assert NotificationEntity.TOPIC == NotificationEntity.from_string("topic")
assert NotificationEntity.SHOUT == NotificationEntity.from_string("shout")
with pytest.raises(ValueError):
NotificationEntity.from_string("INVALID_ENTITY")
def test_notification_action():
"""Тестирование перечисления действий уведомлений."""
assert NotificationAction.CREATE == NotificationAction.from_string("create")
assert NotificationAction.UPDATE == NotificationAction.from_string("update")
with pytest.raises(ValueError):
NotificationAction.from_string("INVALID_ACTION")