summaryrefslogtreecommitdiff
path: root/src/leap/keymanager
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/keymanager')
-rw-r--r--src/leap/keymanager/__init__.py3
-rw-r--r--src/leap/keymanager/tests/test_keymanager.py6
2 files changed, 1 insertions, 8 deletions
diff --git a/src/leap/keymanager/__init__.py b/src/leap/keymanager/__init__.py
index fdd47c3..57e815d 100644
--- a/src/leap/keymanager/__init__.py
+++ b/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/src/leap/keymanager/tests/test_keymanager.py b/src/leap/keymanager/tests/test_keymanager.py
index 3572fb2..387332d 100644
--- a/src/leap/keymanager/tests/test_keymanager.py
+++ b/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)