summaryrefslogtreecommitdiff
path: root/src/leap/eip/tests/test_eipconnection.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-12-06 00:55:07 +0900
committerkali <kali@leap.se>2012-12-12 04:27:51 +0900
commit52aa909c23bff688e2a164dca546e4a493e72fe4 (patch)
tree111e7e4a077524fda1889b24c1ad61366ef9783b /src/leap/eip/tests/test_eipconnection.py
parent490cde9c33039c2c5b16d929d6f8bb8e8f06f430 (diff)
cleanup lingering temporal files
Diffstat (limited to 'src/leap/eip/tests/test_eipconnection.py')
-rw-r--r--src/leap/eip/tests/test_eipconnection.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/leap/eip/tests/test_eipconnection.py b/src/leap/eip/tests/test_eipconnection.py
index 1f1605ed..163f8d45 100644
--- a/src/leap/eip/tests/test_eipconnection.py
+++ b/src/leap/eip/tests/test_eipconnection.py
@@ -1,6 +1,8 @@
+import glob
import logging
import platform
-import os
+#import os
+import shutil
logging.basicConfig()
logger = logging.getLogger(name=__name__)
@@ -74,8 +76,18 @@ class EIPConductorTest(BaseLeapTest):
self.con.run_openvpn_checks()
def tearDown(self):
+ pass
+
+ def doCleanups(self):
+ super(BaseLeapTest, self).doCleanups()
+ self.cleanupSocketDir()
del self.con
+ def cleanupSocketDir(self):
+ ptt = ('/tmp/leap-tmp*')
+ for tmpdir in glob.glob(ptt):
+ shutil.rmtree(tmpdir)
+
#
# tests
#
@@ -86,6 +98,7 @@ class EIPConductorTest(BaseLeapTest):
"""
con = self.con
self.assertEqual(con.autostart, True)
+ # XXX moar!
def test_ovpn_command(self):
"""
@@ -103,6 +116,7 @@ class EIPConductorTest(BaseLeapTest):
# needed to run tests. (roughly 3 secs for this only)
# We should modularize and inject Mocks on more places.
+ oldcon = self.con
del(self.con)
config_checker = Mock()
self.con = MockedEIPConnection(config_checker=config_checker)
@@ -112,6 +126,7 @@ class EIPConductorTest(BaseLeapTest):
skip_download=False)
# XXX test for cert_checker also
+ self.con = oldcon
# connect/disconnect calls