summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/config/tests/test_providerconfig.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-10-04 12:09:58 -0300
committerTomás Touceda <chiiph@leap.se>2013-10-04 12:09:58 -0300
commit584866689560bd2ebea01ecc5e6ae5e79ce7fc81 (patch)
tree4fe300c3c105e17721f79eeece9bbd3745b43d78 /src/leap/bitmask/config/tests/test_providerconfig.py
parent1f0f8efc4cb985c082b3b8fe7b3dc45aed047a47 (diff)
parent759d73ae0728f074e0fb0740269249d0e5066574 (diff)
Merge branch 'release-0.3.4'
Diffstat (limited to 'src/leap/bitmask/config/tests/test_providerconfig.py')
-rw-r--r--src/leap/bitmask/config/tests/test_providerconfig.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/leap/bitmask/config/tests/test_providerconfig.py b/src/leap/bitmask/config/tests/test_providerconfig.py
index 7661a1ce..fe27e683 100644
--- a/src/leap/bitmask/config/tests/test_providerconfig.py
+++ b/src/leap/bitmask/config/tests/test_providerconfig.py
@@ -175,10 +175,9 @@ class ProviderConfigTest(BaseLeapTest):
def test_get_ca_cert_path_as_expected(self):
pc = self._provider_config
- pc.get_path_prefix = Mock(return_value='test')
provider_domain = sample_config['domain']
- expected_path = os.path.join('test', 'leap', 'providers',
+ expected_path = os.path.join('leap', 'providers',
provider_domain, 'keys', 'ca',
'cacert.pem')
@@ -186,24 +185,21 @@ class ProviderConfigTest(BaseLeapTest):
os.path.exists = Mock(return_value=True)
cert_path = pc.get_ca_cert_path()
- self.assertEqual(cert_path, expected_path)
+ self.assertTrue(cert_path.endswith(expected_path))
def test_get_ca_cert_path_about_to_download(self):
pc = self._provider_config
- pc.get_path_prefix = Mock(return_value='test')
provider_domain = sample_config['domain']
- expected_path = os.path.join('test', 'leap', 'providers',
+ expected_path = os.path.join('leap', 'providers',
provider_domain, 'keys', 'ca',
'cacert.pem')
cert_path = pc.get_ca_cert_path(about_to_download=True)
-
- self.assertEqual(cert_path, expected_path)
+ self.assertTrue(cert_path.endswith(expected_path))
def test_get_ca_cert_path_fails(self):
pc = self._provider_config
- pc.get_path_prefix = Mock(return_value='test')
# mock 'get_domain' so we don't need to load a config
provider_domain = 'test.provider.com'