Skip to content

Commit

Permalink
[PR #9662/4d384bd7 backport][stable-10] test helper: fix parameter pa…
Browse files Browse the repository at this point in the history
…ssing in creation static method (#9663)

test helper: fix parameter passing in creation static method (#9662)

(cherry picked from commit 4d384bd)

Co-authored-by: Alexei Znamensky <[email protected]>
  • Loading branch information
patchback[bot] and russoz authored Feb 1, 2025
1 parent c6aecd1 commit 7e4a399
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 7e4a399

Please sign in to comment.