mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 05:40:23 -07:00
Fix linting errors; fix some real bugs (#5111)
* Fix linting errors. * Fix bugs. * Another linter error ignored. * More fixes. * Ignore sanity errors with older versions. ci_complete * Forgot to commit more changes.
This commit is contained in:
parent
0338eb7a7c
commit
a54af8909c
52 changed files with 115 additions and 94 deletions
|
@ -75,8 +75,8 @@ class TestMyModule():
|
|||
}
|
||||
mod_obj.params = args
|
||||
lxca_cmms.main()
|
||||
assert(mock.call(argument_spec=expected_arguments_spec,
|
||||
supports_check_mode=False) == ansible_mod_cls.call_args)
|
||||
assert mock.call(argument_spec=expected_arguments_spec,
|
||||
supports_check_mode=False) == ansible_mod_cls.call_args
|
||||
|
||||
@mock.patch('ansible_collections.community.general.plugins.module_utils.remote_management.lxca.common.setup_conn', autospec=True)
|
||||
@mock.patch('ansible_collections.community.general.plugins.modules.remote_management.lxca.lxca_cmms._cmms_by_uuid',
|
||||
|
|
|
@ -79,8 +79,8 @@ class TestMyModule():
|
|||
}
|
||||
mod_obj.params = args
|
||||
lxca_nodes.main()
|
||||
assert(mock.call(argument_spec=expected_arguments_spec,
|
||||
supports_check_mode=False) == ansible_mod_cls.call_args)
|
||||
assert mock.call(argument_spec=expected_arguments_spec,
|
||||
supports_check_mode=False) == ansible_mod_cls.call_args
|
||||
|
||||
@mock.patch('ansible_collections.community.general.plugins.module_utils.remote_management.lxca.common.setup_conn', autospec=True)
|
||||
@mock.patch('ansible_collections.community.general.plugins.modules.remote_management.lxca.lxca_nodes._nodes_by_uuid',
|
||||
|
|
|
@ -315,9 +315,9 @@ class TestPmem(ModuleTestCase):
|
|||
test_result = result.exception.args[0]['result']
|
||||
expected = json.loads(namespace)
|
||||
|
||||
for i, notuse in enumerate(test_result):
|
||||
self.assertEqual(test_result[i]['dev'], expected[i]['dev'])
|
||||
self.assertEqual(test_result[i]['size'], expected[i]['size'])
|
||||
for i, result in enumerate(test_result):
|
||||
self.assertEqual(result['dev'], expected[i]['dev'])
|
||||
self.assertEqual(result['size'], expected[i]['size'])
|
||||
|
||||
def test_fail_when_required_args_missing(self):
|
||||
with self.assertRaises(AnsibleFailJson):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue