summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-08-17 03:37:21 +0900
committerkali <kali@leap.se>2012-08-17 03:37:21 +0900
commit73e5ebf442c9083a2e6d91d21fae9e879ef8883f (patch)
treef095a04363ca67c33da76e3547d84d2d56e2cee8
parentae59d98caaf59c7ff3f5853b39440c842b11e2f2 (diff)
test for poll state (red)
-rw-r--r--src/leap/eip/test_conductor.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/leap/eip/test_conductor.py b/src/leap/eip/test_conductor.py
index 051bac5..27460d5 100644
--- a/src/leap/eip/test_conductor.py
+++ b/src/leap/eip/test_conductor.py
@@ -129,6 +129,27 @@ class EIPConductorTest(unittest.TestCase):
self.con.connect()
self.con._launch_openvpn.assert_called_once_with()
+ # XXX tests breaking here ...
+
+ def test_good_poll_connection_state(self):
+ """
+ """
+ #@patch --
+ # self.manager.get_connection_state
+ state = self.con.poll_connection_state()
+ # too whitebox??
+ #self.con.status.set_vpn_state.assert_called_with(status_step)
+ self.assertEqual(state, 'connected')
+
+ def test_bad_poll_connection_state(self):
+ """
+ """
+ #@patch --
+ # self.manager.get_connection_state
+ # but raise ConnectionRefusedError
+ state = self.con.poll_connection_state()
+ self.assertEqual(state, None)
+
# XXX more things to test:
# - called config routinges during initz.