diff --git a/backend/tests/user/test_notifs.py b/backend/tests/user/test_notifs.py index 21c08158..61fd3c9f 100644 --- a/backend/tests/user/test_notifs.py +++ b/backend/tests/user/test_notifs.py @@ -33,7 +33,6 @@ def send_notification_batch(self, notifications, topic): del notifications, topic pass - def mock_client(is_dev): return MockAPNsClient() @@ -83,6 +82,8 @@ class TestNotificationService(TransactionTestCase): """Tests for CRUD Notification Settings""" def setUp(self): + from pennmobile.celery import app + app.conf.task_always_eager = True NotificationService.objects.bulk_create( [ NotificationService(name="PENN_MOBILE"), @@ -156,6 +157,7 @@ def setUp(self): initialize_b2b() @mock.patch("user.notifications.IOSNotificationWrapper.get_client", mock_client) + def test_failed_notif(self): # missing title payload = {"body": ":D", "service": "PENN_MOBILE"}