[WIP] add user notifications and text templates
All checks were successful
/ test (push) Successful in 54s

This commit is contained in:
j3d1 2024-11-17 00:35:45 +01:00
parent f7fda52fd0
commit ba031a3204
22 changed files with 750 additions and 28 deletions

View file

@ -0,0 +1,20 @@
from django.contrib.auth.models import Permission
from django.test import TestCase
from authentication.models import ExtendedUser
from notifications.models import UserNotificationChannel
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