From 5636f50cfa36bfa439651b4917b0beb3f9624ea6 Mon Sep 17 00:00:00 2001 From: kali Date: Thu, 23 Aug 2012 03:21:39 +0900 Subject: test_config uses the new leap base testcase --- src/leap/eip/tests/test_config.py | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/leap/eip/tests/test_config.py b/src/leap/eip/tests/test_config.py index 051faa29..b4ad66e5 100644 --- a/src/leap/eip/tests/test_config.py +++ b/src/leap/eip/tests/test_config.py @@ -10,35 +10,22 @@ try: except ImportError: import unittest +from leap.testing.basetest import BaseLeapTest from leap.eip import config _system = platform.system() -class NotImplementedError(Exception): - pass - -# XXX use mock_open here? - - -class EIPConfigTest(unittest.TestCase): +class EIPConfigTest(BaseLeapTest): __name__ = "eip_config_tests" def setUp(self): - self.old_path = os.environ['PATH'] - - self.tdir = tempfile.mkdtemp() - - bin_tdir = os.path.join( - self.tdir, - 'bin') - os.mkdir(bin_tdir) - os.environ['PATH'] = bin_tdir + pass def tearDown(self): - os.environ['PATH'] = self.old_path - shutil.rmtree(self.tdir) + pass + # # helpers # @@ -58,7 +45,7 @@ class EIPConfigTest(unittest.TestCase): def touch_exec(self): tfile = os.path.join( - self.tdir, + self.tempfile, 'bin', 'openvpn') open(tfile, 'bw').close() -- cgit v1.2.3