Teaching objects to load themselves, making the JSON/YAML parsing ambidexterous.

This commit is contained in:
Michael DeHaan 2014-10-08 15:59:24 -04:00
parent c75aeca435
commit 56b6cb5328
12 changed files with 180 additions and 59 deletions

View file

@ -5,10 +5,14 @@ import unittest
class TestModArgsDwim(unittest.TestCase):
# TODO: add tests that construct ModuleArgsParser with a task reference
# TODO: verify the AnsibleError raised on failure knows the task
# and the task knows the line numbers
def setUp(self):
self.m = ModuleArgsParser()
pass
def tearDown(self):
pass
@ -77,5 +81,4 @@ class TestModArgsDwim(unittest.TestCase):
mod, args, to = self.m.parse(dict(local_action='copy src=a dest=b'))
assert mod == 'copy'
assert args == dict(src='a', dest='b')
assert to is 'localhost'
assert to is 'localhost'