diff options
author | Ruben Pollan <meskio@sindominio.net> | 2016-05-05 15:31:23 -0300 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2016-06-01 18:49:15 +0200 |
commit | a60855ac2af5a6a562f08de412ebcfd2148ce992 (patch) | |
tree | 680f8ea2935ab4ad41cc3d481894d2c14b1e3e74 /keymanager/src | |
parent | 6761833c24363e64181b70f94b9bc890ceca1a9f (diff) |
[feat] remove request dependency
Diffstat (limited to 'keymanager/src')
-rw-r--r-- | keymanager/src/leap/keymanager/__init__.py | 3 | ||||
-rw-r--r-- | keymanager/src/leap/keymanager/tests/test_keymanager.py | 6 |
2 files changed, 1 insertions, 8 deletions
diff --git a/keymanager/src/leap/keymanager/__init__.py b/keymanager/src/leap/keymanager/__init__.py index fdd47c3..57e815d 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 3572fb2..387332d 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) |