Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
pomali authored and 50-Course committed Oct 3, 2024
1 parent 906e0f7 commit e448411
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions push_notifications/apns_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_apns_async_push_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e448411

Please sign in to comment.