16 lines
582 B
Python
16 lines
582 B
Python
from django.test import TestCase
|
|
|
|
from vbv_lernwelt.core.tests.factories import UserFactory
|
|
from vbv_lernwelt.notify.tests.factories import NotificationFactory
|
|
|
|
|
|
class TestFactories(TestCase):
|
|
def test_create_notification(self):
|
|
notification = NotificationFactory()
|
|
self.assertIsNotNone(notification)
|
|
|
|
def test_create_notification_with_recipient(self):
|
|
recipient = UserFactory(username="John Doe", email="john.doe@gmail.com")
|
|
notification = NotificationFactory(recipient=recipient)
|
|
self.assertEqual(notification.recipient, recipient)
|