From 4b44d87477fffae38d8e12b99e1923936cf09c3b Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Fri, 5 Jun 2020 18:16:32 -0700 Subject: [PATCH] test_push_notifications: Fix mock_apns type. Signed-off-by: Anders Kaseorg --- zerver/tests/test_push_notifications.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zerver/tests/test_push_notifications.py b/zerver/tests/test_push_notifications.py index cf30c849e6..f694526227 100644 --- a/zerver/tests/test_push_notifications.py +++ b/zerver/tests/test_push_notifications.py @@ -4,7 +4,7 @@ import itertools import requests from unittest import mock from unittest.mock import call -from typing import Any, Dict, List, Optional +from typing import Any, Dict, Iterator, List, Optional import base64 import os @@ -617,7 +617,7 @@ class PushNotificationTest(BouncerTestCase): return message @contextmanager - def mock_apns(self) -> mock.MagicMock: + def mock_apns(self) -> Iterator[mock.MagicMock]: mock_apns = mock.Mock() with mock.patch('zerver.lib.push_notifications.get_apns_client') as mock_get: mock_get.return_value = mock_apns