mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-19 11:20:22 -07:00
test helper: create static methods .from_file() and .from_list() (#7239)
create static methods .from_file() and .from_list()
This commit is contained in:
parent
bc9dca4bc8
commit
bdf8852e8d
9 changed files with 40 additions and 37 deletions
|
@ -15,13 +15,12 @@ __metaclass__ = type
|
|||
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import puppet as module
|
||||
from .cmd_runner_test_utils import CmdRunnerTestHelper
|
||||
from ansible_collections.community.general.plugins.modules import puppet
|
||||
from .helper import CmdRunnerTestHelper
|
||||
|
||||
|
||||
with open("tests/unit/plugins/modules/test_puppet.yaml", "r") as TEST_CASES:
|
||||
helper = CmdRunnerTestHelper(module.main, test_cases=TEST_CASES)
|
||||
patch_bin = helper.cmd_fixture
|
||||
helper = CmdRunnerTestHelper.from_file(puppet.main, "tests/unit/plugins/modules/test_puppet.yaml")
|
||||
patch_bin = helper.cmd_fixture
|
||||
|
||||
|
||||
@pytest.mark.parametrize('patch_ansible_module, testcase',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue