Skip to content

Commit

Permalink
test helper: fix parameter passing in creation static method (#9662)
Browse files Browse the repository at this point in the history
(cherry picked from commit 4d384bd)
  • Loading branch information
russoz authored and patchback[bot] committed Feb 1, 2025
1 parent c5bdb15 commit 109bce5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/unit/plugins/modules/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def from_module(ansible_module, test_module_name, test_spec=None, mocks=None):
test_module = sys.modules[test_module_name]
if test_spec is None:
test_spec = test_module.__file__.replace('.py', '.yaml')
return Helper.from_file(test_module, ansible_module, test_spec)
return Helper.from_file(test_module, ansible_module, test_spec, mocks=mocks)

def add_func_to_test_module(self, name, func):
setattr(self.test_module, name, func)
Expand Down

0 comments on commit 109bce5

Please sign in to comment.