summaryrefslogtreecommitdiff
path: root/src/leap/eip/tests/test_eipconnection.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/eip/tests/test_eipconnection.py')
-rw-r--r--src/leap/eip/tests/test_eipconnection.py30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/leap/eip/tests/test_eipconnection.py b/src/leap/eip/tests/test_eipconnection.py
index 7d8acad6..26f6529e 100644
--- a/src/leap/eip/tests/test_eipconnection.py
+++ b/src/leap/eip/tests/test_eipconnection.py
@@ -50,8 +50,12 @@ class EIPConductorTest(BaseLeapTest):
# for instance:
# We have to TOUCH a keys file because
# we're triggerig the key checks FROM
- # the constructo. me not like that,
+ # the constructor. me not like that,
# key checker should better be called explicitelly.
+
+ # XXX change to keys_checker invocation
+ # (see config_checker)
+
filepath = os.path.expanduser(
'~/.config/leap/providers/%s/openvpn.keys'
% constants.DEFAULT_TEST_PROVIDER)
@@ -60,12 +64,8 @@ class EIPConductorTest(BaseLeapTest):
# we init the manager with only
# some methods mocked
-
- self.manager = Mock(
- name="openvpnmanager_mock")
-
+ self.manager = Mock(name="openvpnmanager_mock")
self.con = MockedEIPConnection()
- #manager=self.manager)
def tearDown(self):
del self.con
@@ -74,14 +74,6 @@ class EIPConductorTest(BaseLeapTest):
# tests
#
- @unittest.skip
- #ain't manager anymore!
- def test_manager_was_initialized(self):
- """
- manager init ok during conductor init?
- """
- self.manager.assert_called_once_with()
-
def test_vpnconnection_defaults(self):
"""
default attrs as expected
@@ -109,6 +101,16 @@ class EIPConductorTest(BaseLeapTest):
self.assertEqual(self.con.args,
[1, 2, 3])
+ # config checks
+
+ def test_config_checked_called(self):
+ del(self.con)
+ config_checker = Mock()
+ self.con = MockedEIPConnection(config_checker=config_checker)
+ self.assertTrue(config_checker.called)
+ self.con.run_checks()
+ self.con.config_checker.run_all.assert_called_with(skip_download=False)
+
# connect/disconnect calls
def test_disconnect(self):