mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
validate-modules --arg-spec (#21331)
* validate-modules --arg-spec * Update developing_modules_documenting.rst * Never mock out ansible or ansible.module_utils * No more false positives
This commit is contained in:
@@ -71,6 +71,10 @@ def add_mocks(filename):
|
||||
parts = module.split('.')
|
||||
for i in range(len(parts)):
|
||||
dotted = '.'.join(parts[:i+1])
|
||||
# Never mock out ansible or ansible.module_utils
|
||||
# we may get here if a specific module_utils file needed mocked
|
||||
if dotted in ('ansible', 'ansible.module_utils',):
|
||||
continue
|
||||
sys.modules[dotted] = sys_mock
|
||||
sys_mocks.append(dotted)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user