c3lf-system-3/core/mail/tests/v2/test_user_notifications.py

21 lines
792 B
Python
Raw Normal View History

2024-04-26 13:18:41 +00:00
from django.contrib.auth.models import Permission
from django.test import TestCase
from authentication.models import ExtendedUser
2024-05-03 21:34:47 +00:00
from notifications.models import UserNotificationChannel
2024-04-26 13:18:41 +00:00
class UserNotificationTestCase(TestCase):
def setUp(self):
super().setUp()
self.user = ExtendedUser.objects.create_user('testuser', 'test', 'test')
self.user.user_permissions.add(*Permission.objects.all())
self.user.save()
self.channel = UserNotificationChannel.objects.create(user=self.user, channel_type='telegram',
channel_target='123456789',
event_filter='*', active=True)
async def test_telegram_notify(self):
pass