Add type annotations (PEP 484) (#25)

This commit is contained in:
Sergey Petrov
2019-07-29 01:26:15 +03:00
committed by GitHub
parent be7438a653
commit fde28abb04
9 changed files with 151 additions and 76 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ from unittest.mock import MagicMock, Mock, patch
import pytest
from apns2.client import APNsClient, CONCURRENT_STREAMS_SAFETY_MAXIMUM, Notification
from apns2.client import APNsClient, CertificateCredentials, CONCURRENT_STREAMS_SAFETY_MAXIMUM, Notification
from apns2.errors import ConnectionFailed
from apns2.payload import Payload
@@ -26,7 +26,7 @@ def notifications(tokens):
def client(mock_connection):
with patch('apns2.credentials.HTTP20Connection') as mock_connection_constructor:
mock_connection_constructor.return_value = mock_connection
return APNsClient(credentials=None)
return APNsClient(credentials=CertificateCredentials())
@pytest.fixture