mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
[PR #7239/bdf8852e backport][stable-7] test helper: create static methods .from_file() and .from_list() (#7245)
test helper: create static methods .from_file() and .from_list() (#7239)
create static methods .from_file() and .from_list()
(cherry picked from commit bdf8852e8d)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
@@ -9,13 +9,12 @@ __metaclass__ = type
|
||||
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import gconftool2 as module
|
||||
from .cmd_runner_test_utils import CmdRunnerTestHelper
|
||||
from ansible_collections.community.general.plugins.modules import gconftool2
|
||||
from .helper import CmdRunnerTestHelper
|
||||
|
||||
|
||||
with open("tests/unit/plugins/modules/test_gconftool2.yaml", "r") as TEST_CASES:
|
||||
helper = CmdRunnerTestHelper(module.main, test_cases=TEST_CASES)
|
||||
patch_bin = helper.cmd_fixture
|
||||
helper = CmdRunnerTestHelper.from_file(gconftool2.main, "tests/unit/plugins/modules/test_gconftool2.yaml")
|
||||
patch_bin = helper.cmd_fixture
|
||||
|
||||
|
||||
@pytest.mark.parametrize('patch_ansible_module, testcase',
|
||||
|
||||
Reference in New Issue
Block a user