From b45398f13a342e7b9a30a5e5e7a183b8ebb96b05 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Thu, 1 Aug 2013 18:24:00 -0300 Subject: Test fix: change exception type. --- src/leap/config/tests/test_providerconfig.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/leap/config/tests/test_providerconfig.py b/src/leap/config/tests/test_providerconfig.py index 4e86a5f7..ff2828e6 100644 --- a/src/leap/config/tests/test_providerconfig.py +++ b/src/leap/config/tests/test_providerconfig.py @@ -28,7 +28,7 @@ import json import copy from leap.common.testing.basetest import BaseLeapTest -from leap.config.providerconfig import ProviderConfig +from leap.config.providerconfig import ProviderConfig, MissingCACert from leap.services import get_supported from mock import Mock @@ -209,7 +209,7 @@ class ProviderConfigTest(BaseLeapTest): provider_domain = 'test.provider.com' pc.get_domain = Mock(return_value=provider_domain) - with self.assertRaises(AssertionError): + with self.assertRaises(MissingCACert): pc.get_ca_cert_path() def test_provides_eip(self): -- cgit v1.2.3 From c0b079cd7dffd50ededacd5b0ff73f29d2641c28 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Thu, 1 Aug 2013 18:24:27 -0300 Subject: PEP8 fix: E501 line too long (80 > 79 characters). --- src/leap/services/soledad/soledadbootstrapper.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/leap/services/soledad/soledadbootstrapper.py b/src/leap/services/soledad/soledadbootstrapper.py index ac063152..6f0c88b4 100644 --- a/src/leap/services/soledad/soledadbootstrapper.py +++ b/src/leap/services/soledad/soledadbootstrapper.py @@ -91,9 +91,8 @@ class SoledadBootstrapper(AbstractBootstrapper): if len(server_dict.keys() > 0): selected_server = server_dict[server_dict.keys()[0]] - server_url = "https://%s:%s/user-%s" % (selected_server["hostname"], - selected_server["port"], - uuid) + server_url = "https://%s:%s/user-%s" % ( + selected_server["hostname"], selected_server["port"], uuid) logger.debug("Using soledad server url: %s" % (server_url,)) @@ -159,10 +158,10 @@ class SoledadBootstrapper(AbstractBootstrapper): # Not modified if res.status_code == 304: logger.debug("Soledad definition has not been modified") - self._soledad_config.load(os.path.join("leap", - "providers", - self._provider_config.get_domain(), - "soledad-service.json")) + self._soledad_config.load( + os.path.join("leap", "providers", + self._provider_config.get_domain(), + "soledad-service.json")) else: soledad_definition, mtime = get_content(res) -- cgit v1.2.3