From ea5d20bc1c8fa3a137cc54d8faa0294f5014d959 Mon Sep 17 00:00:00 2001 From: Folker Bernitt Date: Tue, 9 Feb 2016 10:29:52 +0100 Subject: [tests] fix missing pycryptopp dependency and mock async calls - leap_mail still uses pycryptopp and therefore still needs the dependency - Keymanager calls to async HTTPClient had not been mocked, causing a test to fail - fixed a pep8 warning --- mail/src/leap/mail/generator.py | 1 + mail/src/leap/mail/tests/__init__.py | 2 ++ 2 files changed, 3 insertions(+) (limited to 'mail/src/leap') diff --git a/mail/src/leap/mail/generator.py b/mail/src/leap/mail/generator.py index 28db8dab..7028817a 100644 --- a/mail/src/leap/mail/generator.py +++ b/mail/src/leap/mail/generator.py @@ -1,5 +1,6 @@ from email.generator import Generator as EmailGenerator + class Generator(EmailGenerator): """ Generates output from a Message object tree, keeping signatures. diff --git a/mail/src/leap/mail/tests/__init__.py b/mail/src/leap/mail/tests/__init__.py index 71452d20..8094c116 100644 --- a/mail/src/leap/mail/tests/__init__.py +++ b/mail/src/leap/mail/tests/__init__.py @@ -94,6 +94,8 @@ class TestCaseWithKeyManager(unittest.TestCase, BaseLeapTest): gpgbinary=self.GPG_BINARY_PATH) self._km._fetcher.put = Mock() self._km._fetcher.get = Mock(return_value=Response()) + self._km._async_client.request = Mock(return_value="") + self._km._async_client_pinned.request = Mock(return_value="") d1 = self._km.put_raw_key(PRIVATE_KEY, OpenPGPKey, ADDRESS) d2 = self._km.put_raw_key(PRIVATE_KEY_2, OpenPGPKey, ADDRESS_2) -- cgit v1.2.3