summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/config/tests/test_providerconfig.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-10-01 11:53:12 -0300
committerTomás Touceda <chiiph@leap.se>2013-10-01 11:53:12 -0300
commit95b69d0d2e9801e4db1fe3758b62ab9539ecf882 (patch)
tree81a6b3d7d8a70e4355b97a0cb2b3b61102a59e1e /src/leap/bitmask/config/tests/test_providerconfig.py
parent487993d08cc2e12fdb9c9edcddff5727479e815d (diff)
parent924264776e8dab3c17c09a3188ae701edbaf797b (diff)
Merge remote-tracking branch 'ivan/feature/update-failing-tests' into develop
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'