New v2 ModuleArgsParser code and fixing up tests/other task code

This commit is contained in:
James Cammarata 2014-10-08 10:35:58 -05:00
parent bbd9921dbd
commit c83a833740
5 changed files with 350 additions and 96 deletions

View file

@ -36,13 +36,14 @@ class TestTask(unittest.TestCase):
t = Task.load(basic_shell_task)
assert t is not None
assert t.name == basic_shell_task['name']
assert t.action == 'shell'
assert t.args == 'echo hi'
assert t.action == 'command'
assert t.args == dict(_raw_params='echo hi', _uses_shell=True)
def test_load_task_kv_form(self):
t = Task.load(kv_shell_task)
assert t.action == 'shell'
#assert t.args == 'echo hi'
print "task action is %s" % t.action
assert t.action == 'command'
assert t.args == dict(_raw_params='echo hi', _uses_shell=True)
def test_task_auto_name(self):
assert 'name' not in kv_shell_task