diff options
author | kali <kali@leap.se> | 2012-08-27 05:13:29 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-08-27 05:13:29 +0900 |
commit | c2786de7d2d09d600fa516f93cc1a1f851f0d705 (patch) | |
tree | 8b14f3b74b7f9e506fb77eb9826a0c4843507667 /src/leap/testing | |
parent | c2955d9655e3e7ccb3c5fc9e7d00a0d493d48a40 (diff) |
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).
Diffstat (limited to 'src/leap/testing')
-rw-r--r-- | src/leap/testing/basetest.py | 6 |
1 files changed, 5 insertions, 1 deletions
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 |