summaryrefslogtreecommitdiff
path: root/src/leap/util
diff options
context:
space:
mode:
authorantialias <antialias@leap.se>2012-08-21 16:27:37 -0700
committerantialias <antialias@leap.se>2012-08-21 16:27:37 -0700
commit5d848fe4f127ea01615102e6d8f14bfb12dfe2da (patch)
tree51dff8de10f0276786c0c83a55932a7f8932f6e9 /src/leap/util
parente9a817ceadab842ec5382e074e4d7861dbd2b898 (diff)
parent24f288b5214b814e2e7daa6ef41b226a27d96b81 (diff)
Merge branch 'develop' of ssh://leap.se:4422/leap-client into develop
Diffstat (limited to 'src/leap/util')
-rw-r--r--src/leap/util/tests/test_fileutil.py (renamed from src/leap/util/test_fileutil.py)13
-rw-r--r--src/leap/util/tests/test_leap_argparse.py (renamed from src/leap/util/test_leap_argparse.py)3
2 files changed, 10 insertions, 6 deletions
diff --git a/src/leap/util/test_fileutil.py b/src/leap/util/tests/test_fileutil.py
index 849decaf..f5131b3d 100644
--- a/src/leap/util/test_fileutil.py
+++ b/src/leap/util/tests/test_fileutil.py
@@ -52,8 +52,7 @@ class FileUtilTest(unittest.TestCase):
def test_is_user_executable(self):
"""
- test that a 700 file
- is an 700 file. kindda oximoronic, but...
+ touch_exec_file creates in mode 700?
"""
# XXX could check access X_OK
@@ -63,10 +62,10 @@ class FileUtilTest(unittest.TestCase):
def test_which(self):
"""
+ which implementation ok?
not a very reliable test,
but I cannot think of anything smarter now
I guess it's highly improbable that copy
- command is somewhere else..?
"""
# XXX yep, we can change the syspath
# for the test... !
@@ -78,7 +77,7 @@ class FileUtilTest(unittest.TestCase):
def test_mkdir_p(self):
"""
- test our mkdir -p implementation
+ our own mkdir -p implementation ok?
"""
testdir = self.get_file_path(
os.path.join('test', 'foo', 'bar'))
@@ -88,8 +87,7 @@ class FileUtilTest(unittest.TestCase):
def test_check_and_fix_urw_only(self):
"""
- test function that fixes perms on
- files that should be rw only for owner
+ ensure check_and_fix_urx_only ok?
"""
fp = self.touch_exec_file()
mode = self.get_mode(fp)
@@ -97,3 +95,6 @@ class FileUtilTest(unittest.TestCase):
fileutil.check_and_fix_urw_only(fp)
mode = self.get_mode(fp)
self.assertEqual(mode, int('600', 8))
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/src/leap/util/test_leap_argparse.py b/src/leap/util/tests/test_leap_argparse.py
index 1442e827..f4c86e36 100644
--- a/src/leap/util/test_leap_argparse.py
+++ b/src/leap/util/tests/test_leap_argparse.py
@@ -25,3 +25,6 @@ class LeapArgParseTest(unittest.TestCase):
opts,
Namespace(config_file=None,
debug=True))
+
+if __name__ == "__main__":
+ unittest.main()