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 | 7aa3f323aaaabaa443773e7ceb2b053f66360c3e (patch) | |
tree | 848b91845294c84d9e9ed6135c9c4e2b3a08e8ba | |
parent | e2d8fe5a6bae25452e82e76e50ee2e05320faee2 (diff) |
[feat] remove request dependency
-rw-r--r-- | pkg/requirements.pip | 1 | ||||
-rw-r--r-- | src/leap/keymanager/__init__.py | 3 | ||||
-rw-r--r-- | src/leap/keymanager/tests/test_keymanager.py | 6 |
3 files changed, 1 insertions, 9 deletions
diff --git a/pkg/requirements.pip b/pkg/requirements.pip index c4cb09a..7099304 100644 --- a/pkg/requirements.pip +++ b/pkg/requirements.pip @@ -2,4 +2,3 @@ # in keymanager.__init__ gnupg>=1.4.0 simplejson -requests 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) |