summaryrefslogtreecommitdiff
path: root/src/leap/eip/tests/test_eipconnection.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-08-31 04:39:13 +0900
committerkali <kali@leap.se>2012-08-31 04:39:13 +0900
commit6c4012fc128c5af1b75cf33eef00590cf0e82438 (patch)
treea97f63556f2adfcce8b1a150c775626d7577c383 /src/leap/eip/tests/test_eipconnection.py
parent3c59f021dde265bc314cd6b52d3aafbb8532b1ec (diff)
deprecated configparser. closes #500
Diffstat (limited to 'src/leap/eip/tests/test_eipconnection.py')
-rw-r--r--src/leap/eip/tests/test_eipconnection.py21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/leap/eip/tests/test_eipconnection.py b/src/leap/eip/tests/test_eipconnection.py
index 26f6529e..23f645c3 100644
--- a/src/leap/eip/tests/test_eipconnection.py
+++ b/src/leap/eip/tests/test_eipconnection.py
@@ -1,4 +1,3 @@
-import ConfigParser
import logging
import platform
import os
@@ -13,9 +12,9 @@ except ImportError:
from mock import Mock, patch # MagicMock
-from leap.base import constants
from leap.eip.eipconnection import EIPConnection
from leap.eip.exceptions import ConnectionRefusedError
+from leap.eip import specs as eipspecs
from leap.testing.basetest import BaseLeapTest
_system = platform.system()
@@ -29,7 +28,6 @@ class NotImplementedError(Exception):
@patch('OpenVPNConnection._set_ovpn_command')
class MockedEIPConnection(EIPConnection):
def _get_or_create_config(self):
- self.config = ConfigParser.ConfigParser()
self._set_ovpn_command()
def _set_ovpn_command(self):
@@ -56,11 +54,11 @@ class EIPConductorTest(BaseLeapTest):
# XXX change to keys_checker invocation
# (see config_checker)
- filepath = os.path.expanduser(
- '~/.config/leap/providers/%s/openvpn.keys'
- % constants.DEFAULT_TEST_PROVIDER)
- self.touch(filepath)
- self.chmod600(filepath)
+ keyfiles = (eipspecs.provider_ca_path(),
+ eipspecs.client_cert_path())
+ for filepath in keyfiles:
+ self.touch(filepath)
+ self.chmod600(filepath)
# we init the manager with only
# some methods mocked
@@ -85,13 +83,6 @@ class EIPConductorTest(BaseLeapTest):
self.assertEqual(con.missing_provider, False)
self.assertEqual(con.bad_provider, False)
- def test_config_was_init(self):
- """
- is there a config object?
- """
- self.assertTrue(isinstance(self.con.config,
- ConfigParser.ConfigParser))
-
def test_ovpn_command(self):
"""
set_ovpn_command called