From 58f5998153172154a2d879b22f02c7c381338649 Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Tue, 18 Aug 2020 18:33:14 +0100 Subject: [PATCH] Quieten tests. --- changelog.d/149.misc | 1 + tests/test_apns.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changelog.d/149.misc diff --git a/changelog.d/149.misc b/changelog.d/149.misc new file mode 100644 index 00000000..b782af26 --- /dev/null +++ b/changelog.d/149.misc @@ -0,0 +1 @@ +Remove a source of nuisance, noisy (but otherwise harmless) exceptions in tests. diff --git a/tests/test_apns.py b/tests/test_apns.py index 4663a21c..5898a0a1 100644 --- a/tests/test_apns.py +++ b/tests/test_apns.py @@ -68,7 +68,7 @@ def test_payload_truncation(self): """ # Arrange method = self.apns_pushkin_snotif - method.return_value = testutils.make_async_magic_mock( + method.side_effect = testutils.make_async_magic_mock( NotificationResult("notID", "200") ) self.sygnal.pushkins[PUSHKIN_ID].MAX_JSON_BODY_SIZE = 240 @@ -91,7 +91,7 @@ def test_payload_truncation_test_validity(self): """ # Arrange method = self.apns_pushkin_snotif - method.return_value = testutils.make_async_magic_mock( + method.side_effect = testutils.make_async_magic_mock( NotificationResult("notID", "200") ) self.sygnal.pushkins[PUSHKIN_ID].MAX_JSON_BODY_SIZE = 4096