mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 19:20:22 -07:00
Teaching objects to load themselves, making the JSON/YAML parsing ambidexterous.
This commit is contained in:
parent
c75aeca435
commit
56b6cb5328
12 changed files with 180 additions and 59 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue