multiple module utils: flatten directories (#11974)

* multiple module utils: flatten directories

* adjust pritunl tests

* adjust lxca and keycloak tests

* adjust botmeta

* rename test files correctly

* and an import fix

* rename pritunl api mod utils test

* fix typo in test filename

* rename references to pritunl api test

* rename keycloak mod utils test
This commit is contained in:
Alexei Znamensky
2026-05-06 17:07:51 +12:00
committed by GitHub
parent fb0541defb
commit 1047f45bec
84 changed files with 116 additions and 114 deletions

View File

@@ -14,7 +14,7 @@ from ansible_collections.community.general.plugins.modules import lxca_nodes
@pytest.fixture(scope="module")
@mock.patch(
"ansible_collections.community.general.plugins.module_utils._remote_management.lxca.common.close_conn",
"ansible_collections.community.general.plugins.module_utils._lxca_common.close_conn",
autospec=True,
)
def setup_module(close_conn):
@@ -43,7 +43,7 @@ class TestMyModule:
)
@pytest.mark.usefixtures("patch_ansible_module")
@mock.patch(
"ansible_collections.community.general.plugins.module_utils._remote_management.lxca.common.setup_conn",
"ansible_collections.community.general.plugins.module_utils._lxca_common.setup_conn",
autospec=True,
)
@mock.patch("ansible_collections.community.general.plugins.modules.lxca_nodes.execute_module", autospec=True)
@@ -59,7 +59,7 @@ class TestMyModule:
assert "missing required arguments" in results["msg"]
@mock.patch(
"ansible_collections.community.general.plugins.module_utils._remote_management.lxca.common.setup_conn",
"ansible_collections.community.general.plugins.module_utils._lxca_common.setup_conn",
autospec=True,
)
@mock.patch("ansible_collections.community.general.plugins.modules.lxca_nodes.execute_module", autospec=True)
@@ -96,7 +96,7 @@ class TestMyModule:
assert mock.call(argument_spec=expected_arguments_spec, supports_check_mode=False) == ansible_mod_cls.call_args
@mock.patch(
"ansible_collections.community.general.plugins.module_utils._remote_management.lxca.common.setup_conn",
"ansible_collections.community.general.plugins.module_utils._lxca_common.setup_conn",
autospec=True,
)
@mock.patch("ansible_collections.community.general.plugins.modules.lxca_nodes._nodes_by_uuid", autospec=True)