mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07: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:
parent
47141b8426
commit
53ac312382
2 changed files with 16 additions and 3 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue