From 3265755bb9197e54e66de791d24b7eff70c980e1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 28 Sep 2011 09:15:04 +0200 Subject: [PATCH] test help function Signed-off-by: Nico Schottelius --- test.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test.py b/test.py index 8fe759a6..d03ad0f1 100755 --- a/test.py +++ b/test.py @@ -34,6 +34,8 @@ sys.path.insert(0, os.path.abspath( cdist_exec_path = os.path.abspath( os.path.join(os.path.dirname(os.path.realpath(__file__)), "bin/cdist")) +cdist_commands=["banner", "config", "install"] + import cdist import cdist.config import cdist.exec @@ -155,6 +157,10 @@ class UI(unittest.TestCase): def test_banner(self): self.assertEqual(subprocess.call([cdist_exec_path, "banner"]), 0) + def test_help(self): + for cmd in cdist_commands: + self.assertEqual(subprocess.call([cdist_exec_path, cmd, "-h"]), 0) + if __name__ == '__main__': unittest.main()