diff options
author | kali <kali@leap.se> | 2012-08-24 01:01:06 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-08-24 01:01:06 +0900 |
commit | c2955d9655e3e7ccb3c5fc9e7d00a0d493d48a40 (patch) | |
tree | ff21bf162a97b0cc448775d597b619226f191dfc /src/leap/testing | |
parent | bd154da54eb022d12d225a84cea1053f868eab56 (diff) | |
parent | dc10833bedcdecf081a7c79678614c5521445164 (diff) |
Merge branch 'get-definition.json' into providers-static
adjusted some loose ends to make tests pass again.
this merge is still half-baked regarding functionality:
I've left in place old Configuration class used by
some tests antialias did on his branch. I plan to merge
that functionality with the more recent JSONConfig
and Spec classes.
Conflicts:
src/leap/base/configuration.py
src/leap/eip/config.py
src/leap/eip/tests/test_config.py
Diffstat (limited to 'src/leap/testing')
-rw-r--r-- | src/leap/testing/basetest.py | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/leap/testing/basetest.py b/src/leap/testing/basetest.py index 1ea26363..a55b0525 100644 --- a/src/leap/testing/basetest.py +++ b/src/leap/testing/basetest.py @@ -1,4 +1,5 @@ import os +import platform import shutil import tempfile @@ -7,6 +8,10 @@ try: except ImportError: import unittest +from leap.base.config import get_username, get_groupname + +_system = platform.system() + class BaseLeapTest(unittest.TestCase): @@ -43,5 +48,15 @@ class BaseLeapTest(unittest.TestCase): def get_tempfile(self, filename): return os.path.join(self.tempdir, filename) -if __name__ == "__main__": - unittest.main() + def get_username(self): + return get_username() + + def get_groupname(self): + return get_groupname() + + def _missing_test_for_plat(self, do_raise=False): + if do_raise: + raise NotImplementedError( + "This test is not implemented " + "for the running platform: %s" % + _system) |