From 34d044ac418673d820fda018e726a22e3869b2a4 Mon Sep 17 00:00:00 2001 From: vcai122 Date: Sun, 17 Nov 2024 03:12:53 -0500 Subject: [PATCH] plz fix --- backend/tests/user/test_notifs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"}