From c2786de7d2d09d600fa516f93cc1a1f851f0d705 Mon Sep 17 00:00:00 2001 From: kali Date: Mon, 27 Aug 2012 05:13:29 +0900 Subject: make provider-fetch tests pass test provider-definition dump functions. refactored the set-temp-to-home methods to setUpClass separate provider-fetch tests on different testcases (so they actually call to requests). --- src/leap/testing/basetest.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/leap/testing') diff --git a/src/leap/testing/basetest.py b/src/leap/testing/basetest.py index a55b0525..8d9264f1 100644 --- a/src/leap/testing/basetest.py +++ b/src/leap/testing/basetest.py @@ -20,15 +20,19 @@ class BaseLeapTest(unittest.TestCase): @classmethod def setUpClass(cls): cls.old_path = os.environ['PATH'] - cls.tempdir = tempfile.mkdtemp() + cls.old_home = os.environ['HOME'] + cls.tempdir = tempfile.mkdtemp(prefix="leap_tests-") + cls.home = cls.tempdir bin_tdir = os.path.join( cls.tempdir, 'bin') os.environ["PATH"] = bin_tdir + os.environ["HOME"] = cls.tempdir @classmethod def tearDownClass(cls): os.environ["PATH"] = cls.old_path + os.environ["HOME"] = cls.old_home shutil.rmtree(cls.tempdir) # you have to override these methods -- cgit v1.2.3