summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/services/eip/tests/test_eipconfig.py
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-10-22 13:29:11 -0400
committerMicah Anderson <micah@riseup.net>2013-10-22 13:29:11 -0400
commitf22b1a04f892857d162d87f9c9e120e7c5daadf7 (patch)
tree8998a60a2f55aa6f22a76e7aa1ec176e16f5cf33 /src/leap/bitmask/services/eip/tests/test_eipconfig.py
parentdd907d3098c582b9e92eb181efb87453f046dcc6 (diff)
parent522b886046baf114f2b86173661e568c7c065da6 (diff)
Merge remote-tracking branch 'kali/debian-0.3.4' into debian
Diffstat (limited to 'src/leap/bitmask/services/eip/tests/test_eipconfig.py')
-rw-r--r--src/leap/bitmask/services/eip/tests/test_eipconfig.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/leap/bitmask/services/eip/tests/test_eipconfig.py b/src/leap/bitmask/services/eip/tests/test_eipconfig.py
index 76305e83..4e340f4c 100644
--- a/src/leap/bitmask/services/eip/tests/test_eipconfig.py
+++ b/src/leap/bitmask/services/eip/tests/test_eipconfig.py
@@ -262,15 +262,13 @@ class EIPConfigTest(BaseLeapTest):
def test_get_client_cert_path_as_expected(self):
config = self._get_eipconfig()
- config.get_path_prefix = Mock(return_value='test')
-
provider_config = ProviderConfig()
# mock 'get_domain' so we don't need to load a config
provider_domain = 'test.provider.com'
provider_config.get_domain = Mock(return_value=provider_domain)
- expected_path = os.path.join('test', 'leap', 'providers',
+ expected_path = os.path.join('leap', 'providers',
provider_domain, 'keys', 'client',
'openvpn.pem')
@@ -278,26 +276,24 @@ class EIPConfigTest(BaseLeapTest):
os.path.exists = Mock(return_value=True)
cert_path = config.get_client_cert_path(provider_config)
- self.assertEqual(cert_path, expected_path)
+ self.assertTrue(cert_path.endswith(expected_path))
def test_get_client_cert_path_about_to_download(self):
config = self._get_eipconfig()
- config.get_path_prefix = Mock(return_value='test')
-
provider_config = ProviderConfig()
# mock 'get_domain' so we don't need to load a config
provider_domain = 'test.provider.com'
provider_config.get_domain = Mock(return_value=provider_domain)
- expected_path = os.path.join('test', 'leap', 'providers',
+ expected_path = os.path.join('leap', 'providers',
provider_domain, 'keys', 'client',
'openvpn.pem')
cert_path = config.get_client_cert_path(
provider_config, about_to_download=True)
- self.assertEqual(cert_path, expected_path)
+ self.assertTrue(cert_path.endswith(expected_path))
def test_get_client_cert_path_fails(self):
config = self._get_eipconfig()