diff options
-rw-r--r-- | keymanager/pkg/requirements.pip | 1 | ||||
-rw-r--r-- | keymanager/src/leap/keymanager/__init__.py | 3 | ||||
-rw-r--r-- | keymanager/src/leap/keymanager/tests/test_keymanager.py | 6 |
3 files changed, 1 insertions, 9 deletions
diff --git a/keymanager/pkg/requirements.pip b/keymanager/pkg/requirements.pip index c4cb09af..70993048 100644 --- a/keymanager/pkg/requirements.pip +++ b/keymanager/pkg/requirements.pip @@ -2,4 +2,3 @@ # in keymanager.__init__ gnupg>=1.4.0 simplejson -requests diff --git a/keymanager/src/leap/keymanager/__init__.py b/keymanager/src/leap/keymanager/__init__.py index fdd47c36..57e815df 100644 --- a/keymanager/src/leap/keymanager/__init__.py +++ b/keymanager/src/leap/keymanager/__init__.py @@ -59,7 +59,6 @@ except (ImportError, AssertionError): sys.exit(1) import logging -import requests from twisted.internet import defer from urlparse import urlparse @@ -131,8 +130,6 @@ class KeyManager(object): self.api_version = api_version self.uid = uid self._openpgp = OpenPGPScheme(soledad, gpgbinary=gpgbinary) - # the following are used to perform https requests - self._fetcher = requests self._combined_ca_bundle = self._create_combined_bundle_file() self._async_client = HTTPClient(self._combined_ca_bundle) self._async_client_pinned = HTTPClient(self._ca_cert_path) diff --git a/keymanager/src/leap/keymanager/tests/test_keymanager.py b/keymanager/src/leap/keymanager/tests/test_keymanager.py index 3572fb28..387332d8 100644 --- a/keymanager/src/leap/keymanager/tests/test_keymanager.py +++ b/keymanager/src/leap/keymanager/tests/test_keymanager.py @@ -371,11 +371,7 @@ class KeyManagerKeyManagementTestCase(KeyManagerWithSoledadTestCase): """ km = self._key_manager() - class Response(object): - ok = True - content = "" - - km._fetcher.get = Mock(return_value=Response()) + km._async_client.request = Mock(return_value=defer.succeed("")) d = km.fetch_key(ADDRESS, "http://site.domain/key") return self.assertFailure(d, errors.KeyNotFound) |