mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
New v2 ModuleArgsParser code and fixing up tests/other task code
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user