mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-15 17:40:50 -07:00
This reverts commit 4349b56643
.
This commit is contained in:
parent
b6528ea19f
commit
ea18b9021a
15 changed files with 200 additions and 195 deletions
|
@ -575,21 +575,6 @@ class TestModuleUtilsBasic(ModuleTestCase):
|
|||
supports_check_mode=True,
|
||||
)
|
||||
|
||||
# should test ok, handles key argument
|
||||
key_spec = dict(foo=dict(key=True), bar=dict())
|
||||
args = json.dumps(dict(ANSIBLE_MODULE_ARGS={'foobar': ['test-1', 'test-2']}))
|
||||
with swap_stdin_and_argv(stdin_data=args):
|
||||
basic._ANSIBLE_ARGS = None
|
||||
am = basic.AnsibleModule(
|
||||
argument_spec=dict(foobar=dict(type='list', elements='dict', options=key_spec, required=True)),
|
||||
no_log=True,
|
||||
check_invalid_arguments=False,
|
||||
add_file_common_args=True,
|
||||
supports_check_mode=True
|
||||
)
|
||||
self.assertEqual(am.params['foobar'][0]['foo'], 'test-1')
|
||||
self.assertEqual(am.params['foobar'][1]['foo'], 'test-2')
|
||||
|
||||
def test_module_utils_basic_ansible_module_type_check(self):
|
||||
from ansible.module_utils import basic
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue