summaryrefslogtreecommitdiff
path: root/src/leap/keymanager/tests
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2015-09-24 12:19:36 +0200
committerRuben Pollan <meskio@sindominio.net>2015-09-24 12:19:36 +0200
commitbad4662976e46047654d9b610f0e8517a43bfcc6 (patch)
tree9d9cd01f75c0b2734561ca74bfff43d1b157b18f /src/leap/keymanager/tests
parent1b805754f1d6efe9af25dcf0ab60b3aa2100ee20 (diff)
parent3da04e10ce961e2606ce00125d092d9daa621636 (diff)
Merge branch 'fix_empty_string_ca_certs' into develop
Diffstat (limited to 'src/leap/keymanager/tests')
-rw-r--r--src/leap/keymanager/tests/test_keymanager.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/leap/keymanager/tests/test_keymanager.py b/src/leap/keymanager/tests/test_keymanager.py
index 7c00292..3b4aa0f 100644
--- a/src/leap/keymanager/tests/test_keymanager.py
+++ b/src/leap/keymanager/tests/test_keymanager.py
@@ -346,7 +346,18 @@ class KeyManagerKeyManagementTestCase(KeyManagerWithSoledadTestCase):
verify=ca_bundle.where())
@inlineCallbacks
- def test_fetch_key_uses_default_ca_bundle_if_also_set_as_ca_cert(self):
+ def test_fetch_key_uses_ca_bundle_if_empty_string_specified(self):
+ ca_cert_path = ''
+ km = self._key_manager(ca_cert_path=ca_cert_path)
+ get_mock = self._mock_get_response(km, PUBLIC_KEY_OTHER)
+
+ yield km.fetch_key(ADDRESS_OTHER, REMOTE_KEY_URL, OpenPGPKey)
+
+ get_mock.assert_called_once_with(REMOTE_KEY_URL, data=None,
+ verify=ca_bundle.where())
+
+ @inlineCallbacks
+ def test_fetch_key_uses_default_ca_bundle_if_also_set_as_ca_cert_path(self):
ca_cert_path = ca_bundle.where()
km = self._key_manager(ca_cert_path=ca_cert_path)
get_mock = self._mock_get_response(km, PUBLIC_KEY_OTHER)