From fdc90f80403acc7f6c3738493452f68aef6ec6f9 Mon Sep 17 00:00:00 2001 From: pom Date: Fri, 28 Jun 2024 12:40:00 +0200 Subject: [PATCH] cleanup --- push_notifications/apns_async.py | 7 ++----- tests/test_apns_async_push_payload.py | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/push_notifications/apns_async.py b/push_notifications/apns_async.py index b8cb75e5..a0710d85 100644 --- a/push_notifications/apns_async.py +++ b/push_notifications/apns_async.py @@ -135,12 +135,9 @@ def send_message( self, request: NotificationRequest, ): - print("a") loop = asyncio.get_event_loop() - res1 = self.client.send_notification(request) - print("b", res1) - res = loop.run_until_complete(res1) - print("c", res) + routine = self.client.send_notification(request) + res = loop.run_until_complete(routine) return res def _create_notification_request_from_args( diff --git a/tests/test_apns_async_push_payload.py b/tests/test_apns_async_push_payload.py index 3e7d5a78..ebb11416 100644 --- a/tests/test_apns_async_push_payload.py +++ b/tests/test_apns_async_push_payload.py @@ -5,9 +5,9 @@ import pytest from django.test import TestCase -from aioapns.common import NotificationResult try: + from aioapns.common import NotificationResult from push_notifications.apns_async import TokenCredentials, apns_send_message except ModuleNotFoundError: # skipping because apns2 is not supported on python 3.10