mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-17 17:31:31 +00:00
[PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409)
Sort imports with ruff check --fix (#11400)
Sort imports with ruff check --fix.
(cherry picked from commit 236b9c0e04)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
ebaf2e71d5
commit
b769b0bc01
829 changed files with 1644 additions and 1692 deletions
|
|
@ -9,12 +9,12 @@ import json
|
|||
from collections.abc import MutableMapping
|
||||
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils import deps
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
set_module_args as _set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils import deps
|
||||
|
||||
|
||||
def _fix_ansible_args(args):
|
||||
if isinstance(args, str):
|
||||
|
|
|
|||
|
|
@ -6,10 +6,11 @@ from __future__ import annotations
|
|||
|
||||
import unittest
|
||||
|
||||
from httmock import response # noqa
|
||||
from httmock import urlmatch # noqa
|
||||
|
||||
import gitlab
|
||||
from httmock import (
|
||||
response, # noqa
|
||||
urlmatch, # noqa
|
||||
)
|
||||
|
||||
|
||||
class FakeAnsibleModule:
|
||||
|
|
|
|||
|
|
@ -5,12 +5,15 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
import re
|
||||
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
from .oneview_module_loader import ONEVIEW_MODULE_UTILS_PATH
|
||||
from hpOneView.oneview_client import OneViewClient
|
||||
|
||||
# This import must come *after* the oneview_module_loader import!
|
||||
from hpOneView.oneview_client import OneViewClient # isort: skip
|
||||
|
||||
|
||||
class OneViewBaseTest:
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import interfaces_file
|
||||
from shutil import copyfile, move
|
||||
import difflib
|
||||
import inspect
|
||||
import json
|
||||
|
|
@ -17,6 +15,9 @@ import re
|
|||
import shutil
|
||||
import tempfile
|
||||
import unittest
|
||||
from shutil import copyfile, move
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import interfaces_file
|
||||
|
||||
|
||||
class AnsibleFailJson(Exception):
|
||||
|
|
|
|||
|
|
@ -4,11 +4,14 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
from unittest.mock import Mock, patch
|
||||
from .oneview_module_loader import ONEVIEW_MODULE_UTILS_PATH
|
||||
from hpOneView.oneview_client import OneViewClient
|
||||
|
||||
# This import must come *after* the oneview_module_loader import!
|
||||
from hpOneView.oneview_client import OneViewClient # isort: skip
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
|
|||
|
|
@ -15,21 +15,38 @@ if "hpOneView" not in sys.modules:
|
|||
|
||||
ONEVIEW_MODULE_UTILS_PATH = "ansible_collections.community.general.plugins.module_utils.oneview"
|
||||
from ansible_collections.community.general.plugins.module_utils.oneview import ( # noqa: F401, pylint: disable=unused-import
|
||||
OneViewModuleException,
|
||||
OneViewModuleTaskError,
|
||||
OneViewModuleResourceNotFound,
|
||||
OneViewModuleBase,
|
||||
OneViewModuleException,
|
||||
OneViewModuleResourceNotFound,
|
||||
OneViewModuleTaskError,
|
||||
)
|
||||
from ansible_collections.community.general.plugins.modules.oneview_ethernet_network import ( # pylint: disable=unused-import
|
||||
EthernetNetworkModule, # noqa: F401
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.modules.oneview_ethernet_network import EthernetNetworkModule # noqa: F401, pylint: disable=unused-import
|
||||
from ansible_collections.community.general.plugins.modules.oneview_ethernet_network_info import ( # noqa: F401, pylint: disable=unused-import
|
||||
EthernetNetworkInfoModule,
|
||||
)
|
||||
from ansible_collections.community.general.plugins.modules.oneview_fc_network import FcNetworkModule # noqa: F401, pylint: disable=unused-import
|
||||
from ansible_collections.community.general.plugins.modules.oneview_fc_network_info import FcNetworkInfoModule # noqa: F401, pylint: disable=unused-import
|
||||
from ansible_collections.community.general.plugins.modules.oneview_fcoe_network import FcoeNetworkModule # noqa: F401, pylint: disable=unused-import
|
||||
from ansible_collections.community.general.plugins.modules.oneview_fcoe_network_info import FcoeNetworkInfoModule # noqa: F401, pylint: disable=unused-import
|
||||
from ansible_collections.community.general.plugins.modules.oneview_network_set import NetworkSetModule # noqa: F401, pylint: disable=unused-import
|
||||
from ansible_collections.community.general.plugins.modules.oneview_network_set_info import NetworkSetInfoModule # noqa: F401, pylint: disable=unused-import
|
||||
from ansible_collections.community.general.plugins.modules.oneview_san_manager import SanManagerModule # noqa: F401, pylint: disable=unused-import
|
||||
from ansible_collections.community.general.plugins.modules.oneview_san_manager_info import SanManagerInfoModule # noqa: F401, pylint: disable=unused-import
|
||||
from ansible_collections.community.general.plugins.modules.oneview_fc_network import ( # pylint: disable=unused-import
|
||||
FcNetworkModule, # noqa: F401
|
||||
)
|
||||
from ansible_collections.community.general.plugins.modules.oneview_fc_network_info import ( # pylint: disable=unused-import
|
||||
FcNetworkInfoModule, # noqa: F401
|
||||
)
|
||||
from ansible_collections.community.general.plugins.modules.oneview_fcoe_network import ( # pylint: disable=unused-import
|
||||
FcoeNetworkModule, # noqa: F401
|
||||
)
|
||||
from ansible_collections.community.general.plugins.modules.oneview_fcoe_network_info import ( # pylint: disable=unused-import
|
||||
FcoeNetworkInfoModule, # noqa: F401
|
||||
)
|
||||
from ansible_collections.community.general.plugins.modules.oneview_network_set import ( # pylint: disable=unused-import
|
||||
NetworkSetModule, # noqa: F401
|
||||
)
|
||||
from ansible_collections.community.general.plugins.modules.oneview_network_set_info import ( # pylint: disable=unused-import
|
||||
NetworkSetInfoModule, # noqa: F401
|
||||
)
|
||||
from ansible_collections.community.general.plugins.modules.oneview_san_manager import ( # pylint: disable=unused-import
|
||||
SanManagerModule, # noqa: F401
|
||||
)
|
||||
from ansible_collections.community.general.plugins.modules.oneview_san_manager_info import ( # pylint: disable=unused-import
|
||||
SanManagerInfoModule, # noqa: F401
|
||||
)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import json
|
|||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
from ansible_collections.community.general.plugins.modules import alerta_customer
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
|
|
@ -16,6 +15,8 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import alerta_customer
|
||||
|
||||
|
||||
class MockedReponse:
|
||||
def __init__(self, data):
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from unittest import mock
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import apk
|
||||
|
||||
|
|
|
|||
|
|
@ -4,14 +4,15 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
import pytest
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
ModuleTestCase,
|
||||
set_module_args,
|
||||
)
|
||||
from ansible_collections.community.general.plugins.modules.archive import get_archive, common_path, create_module
|
||||
|
||||
from ansible_collections.community.general.plugins.modules.archive import common_path, create_module, get_archive
|
||||
|
||||
|
||||
class TestArchive(ModuleTestCase):
|
||||
|
|
|
|||
|
|
@ -6,15 +6,16 @@ from __future__ import annotations
|
|||
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper
|
||||
from ansible_collections.community.general.plugins.modules import bitbucket_access_key
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleFailJson,
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
ModuleTestCase,
|
||||
set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper
|
||||
from ansible_collections.community.general.plugins.modules import bitbucket_access_key
|
||||
|
||||
|
||||
class TestBucketAccessKeyModule(ModuleTestCase):
|
||||
def setUp(self):
|
||||
|
|
|
|||
|
|
@ -6,15 +6,16 @@ from __future__ import annotations
|
|||
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper
|
||||
from ansible_collections.community.general.plugins.modules import bitbucket_pipeline_key_pair
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleFailJson,
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
ModuleTestCase,
|
||||
set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper
|
||||
from ansible_collections.community.general.plugins.modules import bitbucket_pipeline_key_pair
|
||||
|
||||
|
||||
class TestBucketPipelineKeyPairModule(ModuleTestCase):
|
||||
def setUp(self):
|
||||
|
|
|
|||
|
|
@ -7,16 +7,16 @@ from __future__ import annotations
|
|||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper
|
||||
from ansible_collections.community.general.plugins.modules import bitbucket_pipeline_known_host
|
||||
from ansible_collections.community.general.plugins.modules.bitbucket_pipeline_known_host import HAS_PARAMIKO
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
ModuleTestCase,
|
||||
set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper
|
||||
from ansible_collections.community.general.plugins.modules import bitbucket_pipeline_known_host
|
||||
from ansible_collections.community.general.plugins.modules.bitbucket_pipeline_known_host import HAS_PARAMIKO
|
||||
|
||||
|
||||
class TestBucketPipelineKnownHostModule(ModuleTestCase):
|
||||
def setUp(self):
|
||||
|
|
|
|||
|
|
@ -6,15 +6,16 @@ from __future__ import annotations
|
|||
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper
|
||||
from ansible_collections.community.general.plugins.modules import bitbucket_pipeline_variable
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleFailJson,
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
ModuleTestCase,
|
||||
set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper
|
||||
from ansible_collections.community.general.plugins.modules import bitbucket_pipeline_variable
|
||||
|
||||
|
||||
class TestBucketPipelineVariableModule(ModuleTestCase):
|
||||
def setUp(self):
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from unittest.mock import patch
|
||||
from ansible_collections.community.general.plugins.modules import bootc_manage
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
|
|
@ -13,6 +13,8 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import bootc_manage
|
||||
|
||||
|
||||
class TestBootcManageModule(ModuleTestCase):
|
||||
def setUp(self):
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
from unittest.mock import patch
|
||||
from ansible_collections.community.general.plugins.modules import campfire
|
||||
|
||||
import pytest
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
|
|
@ -14,6 +14,8 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import campfire
|
||||
|
||||
|
||||
class TestCampfireModule(ModuleTestCase):
|
||||
def setUp(self):
|
||||
|
|
|
|||
|
|
@ -9,16 +9,17 @@ import json
|
|||
import re
|
||||
import uuid
|
||||
from unittest.mock import patch
|
||||
from urllib3.response import HTTPResponse
|
||||
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
from ansible_collections.community.general.plugins.modules import circonus_annotation
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
ModuleTestCase,
|
||||
set_module_args,
|
||||
)
|
||||
from urllib3.response import HTTPResponse
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import circonus_annotation
|
||||
|
||||
|
||||
class TestCirconusAnnotation(ModuleTestCase):
|
||||
|
|
|
|||
|
|
@ -7,9 +7,8 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import composer
|
||||
from .uthelper import UTHelper, RunCommandMock
|
||||
|
||||
from .uthelper import RunCommandMock, UTHelper
|
||||
|
||||
UTHelper.from_module(composer, __name__, mocks=[RunCommandMock])
|
||||
|
|
|
|||
|
|
@ -10,9 +10,8 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import cpanm
|
||||
from .uthelper import UTHelper, RunCommandMock
|
||||
|
||||
from .uthelper import RunCommandMock, UTHelper
|
||||
|
||||
UTHelper.from_module(cpanm, __name__, mocks=[RunCommandMock])
|
||||
|
|
|
|||
|
|
@ -4,18 +4,18 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import datadog_downtime
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
ModuleTestCase,
|
||||
set_module_args,
|
||||
)
|
||||
|
||||
from pytest import importorskip
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import datadog_downtime
|
||||
|
||||
# Skip this test if datadog_api_client cannot be installed
|
||||
datadog_api_client = importorskip("datadog_api_client")
|
||||
Downtime = datadog_api_client.v1.model.downtime.Downtime
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@ import json
|
|||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import discord
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
|
|
@ -17,6 +15,8 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import discord
|
||||
|
||||
|
||||
class TestDiscordModule(ModuleTestCase):
|
||||
def setUp(self):
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import django_check
|
||||
from .uthelper import UTHelper, RunCommandMock
|
||||
|
||||
from .uthelper import RunCommandMock, UTHelper
|
||||
|
||||
UTHelper.from_module(django_check, __name__, mocks=[RunCommandMock])
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import django_command
|
||||
from .uthelper import UTHelper, RunCommandMock
|
||||
|
||||
from .uthelper import RunCommandMock, UTHelper
|
||||
|
||||
UTHelper.from_module(django_command, __name__, mocks=[RunCommandMock])
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import django_createcachetable
|
||||
from .uthelper import UTHelper, RunCommandMock
|
||||
|
||||
from .uthelper import RunCommandMock, UTHelper
|
||||
|
||||
UTHelper.from_module(django_createcachetable, __name__, mocks=[RunCommandMock])
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import django_dumpdata
|
||||
from .uthelper import UTHelper, RunCommandMock
|
||||
|
||||
from .uthelper import RunCommandMock, UTHelper
|
||||
|
||||
UTHelper.from_module(django_dumpdata, __name__, mocks=[RunCommandMock])
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import django_loaddata
|
||||
from .uthelper import UTHelper, RunCommandMock
|
||||
|
||||
from .uthelper import RunCommandMock, UTHelper
|
||||
|
||||
UTHelper.from_module(django_loaddata, __name__, mocks=[RunCommandMock])
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
from __future__ import annotations
|
||||
|
||||
from unittest.mock import patch, call
|
||||
from ansible_collections.community.general.plugins.modules import dnf_config_manager as dnf_config_manager_module
|
||||
from unittest.mock import call, patch
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
|
|
@ -12,6 +12,8 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import dnf_config_manager as dnf_config_manager_module
|
||||
|
||||
# Return value on all-default arguments
|
||||
mock_repolist_crb_enabled = """Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install
|
||||
DNF version: 4.14.0
|
||||
|
|
|
|||
|
|
@ -4,14 +4,16 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import dnsimple as dnsimple_module
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleFailJson,
|
||||
ModuleTestCase,
|
||||
set_module_args,
|
||||
)
|
||||
from unittest.mock import patch
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import dnsimple as dnsimple_module
|
||||
|
||||
dnsimple = pytest.importorskip("dnsimple")
|
||||
|
||||
|
|
|
|||
|
|
@ -4,17 +4,15 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import dnsimple_info
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
ModuleTestCase,
|
||||
set_module_args,
|
||||
AnsibleExitJson,
|
||||
)
|
||||
from httmock import response
|
||||
from httmock import with_httmock
|
||||
from httmock import urlmatch
|
||||
from httmock import response, urlmatch, with_httmock
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import dnsimple_info
|
||||
|
||||
|
||||
@urlmatch(netloc="(.)*dnsimple.com(.)*", path="/v2/[0-9]*/zones/")
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import facter_facts
|
||||
from .uthelper import UTHelper, RunCommandMock
|
||||
|
||||
from .uthelper import RunCommandMock, UTHelper
|
||||
|
||||
UTHelper.from_module(facter_facts, __name__, mocks=[RunCommandMock])
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import gconftool2
|
||||
from .uthelper import UTHelper, RunCommandMock
|
||||
|
||||
from .uthelper import RunCommandMock, UTHelper
|
||||
|
||||
UTHelper.from_module(gconftool2, __name__, mocks=[RunCommandMock])
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import gconftool2_info
|
||||
from .uthelper import UTHelper, RunCommandMock
|
||||
|
||||
from .uthelper import RunCommandMock, UTHelper
|
||||
|
||||
UTHelper.from_module(gconftool2_info, __name__, mocks=[RunCommandMock])
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@ from __future__ import annotations
|
|||
import copy
|
||||
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import gem
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
|
|
@ -15,6 +13,8 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import gem
|
||||
|
||||
|
||||
def get_command(run_command):
|
||||
"""Generate the command line string from the patched run_command"""
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import gio_mime
|
||||
from .uthelper import UTHelper, RunCommandMock
|
||||
|
||||
from .uthelper import RunCommandMock, UTHelper
|
||||
|
||||
UTHelper.from_module(gio_mime, __name__, mocks=[RunCommandMock])
|
||||
|
|
|
|||
|
|
@ -4,13 +4,14 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
import json
|
||||
import re
|
||||
import unittest
|
||||
import pytest
|
||||
from httmock import with_httmock, urlmatch, response
|
||||
from ansible_collections.community.general.plugins.modules import github_repo
|
||||
|
||||
import pytest
|
||||
from httmock import response, urlmatch, with_httmock
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import github_repo
|
||||
|
||||
pytest.importorskip("github")
|
||||
|
||||
|
|
|
|||
|
|
@ -17,16 +17,16 @@ def _dummy(x):
|
|||
|
||||
pytestmark = []
|
||||
try:
|
||||
from .gitlab import (
|
||||
GitlabModuleTestCase,
|
||||
resp_get_project,
|
||||
resp_find_project_deploy_key,
|
||||
resp_create_project_deploy_key,
|
||||
resp_delete_project_deploy_key,
|
||||
)
|
||||
|
||||
# GitLab module requirements
|
||||
from gitlab.v4.objects import ProjectKey
|
||||
|
||||
from .gitlab import (
|
||||
GitlabModuleTestCase,
|
||||
resp_create_project_deploy_key,
|
||||
resp_delete_project_deploy_key,
|
||||
resp_find_project_deploy_key,
|
||||
resp_get_project,
|
||||
)
|
||||
except ImportError:
|
||||
pytestmark.append(pytest.mark.skip("Could not load gitlab module required for testing"))
|
||||
# Need to set these to something so that we don't fail when parsing
|
||||
|
|
|
|||
|
|
@ -17,18 +17,18 @@ def _dummy(x):
|
|||
|
||||
pytestmark = []
|
||||
try:
|
||||
# GitLab module requirements
|
||||
from gitlab.v4.objects import Group
|
||||
|
||||
from .gitlab import (
|
||||
GitlabModuleTestCase,
|
||||
resp_get_group,
|
||||
resp_get_missing_group,
|
||||
resp_create_group,
|
||||
resp_create_subgroup,
|
||||
resp_delete_group,
|
||||
resp_find_group_project,
|
||||
resp_get_group,
|
||||
resp_get_missing_group,
|
||||
)
|
||||
|
||||
# GitLab module requirements
|
||||
from gitlab.v4.objects import Group
|
||||
except ImportError:
|
||||
pytestmark.append(pytest.mark.skip("Could not load gitlab module required for testing"))
|
||||
# Need to set these to something so that we don't fail when parsing
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
import gitlab
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.general.plugins.modules.gitlab_group_access_token import GitLabGroupAccessToken
|
||||
|
||||
|
|
@ -27,10 +27,10 @@ pytestmark = []
|
|||
try:
|
||||
from .gitlab import (
|
||||
GitlabModuleTestCase,
|
||||
resp_get_user,
|
||||
resp_get_group,
|
||||
resp_list_group_access_tokens,
|
||||
resp_create_group_access_tokens,
|
||||
resp_get_group,
|
||||
resp_get_user,
|
||||
resp_list_group_access_tokens,
|
||||
resp_revoke_group_access_tokens,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -17,16 +17,16 @@ def _dummy(x):
|
|||
|
||||
pytestmark = []
|
||||
try:
|
||||
from .gitlab import (
|
||||
GitlabModuleTestCase,
|
||||
resp_get_project,
|
||||
resp_find_project_hook,
|
||||
resp_create_project_hook,
|
||||
resp_delete_project_hook,
|
||||
)
|
||||
|
||||
# GitLab module requirements
|
||||
from gitlab.v4.objects import ProjectHook
|
||||
|
||||
from .gitlab import (
|
||||
GitlabModuleTestCase,
|
||||
resp_create_project_hook,
|
||||
resp_delete_project_hook,
|
||||
resp_find_project_hook,
|
||||
resp_get_project,
|
||||
)
|
||||
except ImportError:
|
||||
pytestmark.append(pytest.mark.skip("Could not load gitlab module required for testing"))
|
||||
# Need to set these to something so that we don't fail when parsing
|
||||
|
|
|
|||
|
|
@ -17,18 +17,18 @@ def _dummy(x):
|
|||
|
||||
pytestmark = []
|
||||
try:
|
||||
from .gitlab import (
|
||||
GitlabModuleTestCase,
|
||||
resp_get_group,
|
||||
resp_get_project_by_name,
|
||||
resp_create_project,
|
||||
resp_get_project,
|
||||
resp_delete_project,
|
||||
resp_get_user,
|
||||
)
|
||||
|
||||
# GitLab module requirements
|
||||
from gitlab.v4.objects import Project
|
||||
|
||||
from .gitlab import (
|
||||
GitlabModuleTestCase,
|
||||
resp_create_project,
|
||||
resp_delete_project,
|
||||
resp_get_group,
|
||||
resp_get_project,
|
||||
resp_get_project_by_name,
|
||||
resp_get_user,
|
||||
)
|
||||
except ImportError:
|
||||
pytestmark.append(pytest.mark.skip("Could not load gitlab module required for testing"))
|
||||
# Need to set these to something so that we don't fail when parsing
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
import gitlab
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.general.plugins.modules.gitlab_project_access_token import GitLabProjectAccessToken
|
||||
|
||||
|
|
@ -27,10 +27,10 @@ pytestmark = []
|
|||
try:
|
||||
from .gitlab import (
|
||||
GitlabModuleTestCase,
|
||||
resp_get_user,
|
||||
resp_get_project,
|
||||
resp_list_project_access_tokens,
|
||||
resp_create_project_access_tokens,
|
||||
resp_get_project,
|
||||
resp_get_user,
|
||||
resp_list_project_access_tokens,
|
||||
resp_revoke_project_access_tokens,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ from __future__ import annotations
|
|||
import pytest
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.version import LooseVersion
|
||||
|
||||
from ansible_collections.community.general.plugins.modules.gitlab_protected_branch import GitlabProtectedBranch
|
||||
|
||||
|
||||
|
|
@ -19,20 +18,20 @@ def _dummy(x):
|
|||
|
||||
pytestmark = []
|
||||
try:
|
||||
# GitLab module requirements
|
||||
from gitlab.v4.objects import Project # noqa: F401, pylint: disable=unused-import
|
||||
|
||||
from .gitlab import (
|
||||
GitlabModuleTestCase,
|
||||
python_gitlab_module_version,
|
||||
python_gitlab_version_match_requirement,
|
||||
resp_get_protected_branch,
|
||||
resp_get_project_by_name,
|
||||
resp_get_protected_branch_not_exist,
|
||||
resp_delete_protected_branch,
|
||||
resp_get_project_by_name,
|
||||
resp_get_protected_branch,
|
||||
resp_get_protected_branch_not_exist,
|
||||
resp_get_user,
|
||||
)
|
||||
|
||||
# GitLab module requirements
|
||||
from gitlab.v4.objects import Project # noqa: F401, pylint: disable=unused-import
|
||||
|
||||
gitlab_req_version = python_gitlab_version_match_requirement()
|
||||
gitlab_module_version = python_gitlab_module_version()
|
||||
if LooseVersion(gitlab_module_version) < LooseVersion(gitlab_req_version):
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import gitlab
|
||||
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.general.plugins.modules.gitlab_runner import GitLabRunner
|
||||
|
|
@ -19,22 +18,22 @@ def _dummy(x):
|
|||
|
||||
pytestmark = []
|
||||
try:
|
||||
# GitLab module requirements
|
||||
from gitlab.v4.objects import Runner
|
||||
|
||||
from .gitlab import (
|
||||
FakeAnsibleModule,
|
||||
GitlabModuleTestCase,
|
||||
resp_find_runners_all,
|
||||
resp_find_runners_list,
|
||||
resp_find_project_runners,
|
||||
resp_find_group_runners,
|
||||
resp_get_runner,
|
||||
resp_create_runner,
|
||||
resp_delete_runner,
|
||||
resp_get_project_by_name,
|
||||
resp_find_group_runners,
|
||||
resp_find_project_runners,
|
||||
resp_find_runners_all,
|
||||
resp_find_runners_list,
|
||||
resp_get_group_by_name,
|
||||
resp_get_project_by_name,
|
||||
resp_get_runner,
|
||||
)
|
||||
|
||||
# GitLab module requirements
|
||||
from gitlab.v4.objects import Runner
|
||||
except ImportError:
|
||||
pytestmark.append(pytest.mark.skip("Could not load gitlab module required for testing"))
|
||||
# Need to set these to something so that we don't fail when parsing
|
||||
|
|
|
|||
|
|
@ -17,23 +17,22 @@ def _dummy(x):
|
|||
|
||||
pytestmark = []
|
||||
try:
|
||||
from .gitlab import (
|
||||
GitlabModuleTestCase,
|
||||
resp_find_user,
|
||||
resp_get_user,
|
||||
resp_get_user_keys,
|
||||
resp_create_user_keys,
|
||||
resp_create_user,
|
||||
resp_delete_user,
|
||||
resp_get_member,
|
||||
resp_get_group,
|
||||
resp_add_member,
|
||||
resp_update_member,
|
||||
resp_get_member,
|
||||
)
|
||||
|
||||
# GitLab module requirements
|
||||
from gitlab.v4.objects import User
|
||||
|
||||
from .gitlab import (
|
||||
GitlabModuleTestCase,
|
||||
resp_add_member,
|
||||
resp_create_user,
|
||||
resp_create_user_keys,
|
||||
resp_delete_user,
|
||||
resp_find_user,
|
||||
resp_get_group,
|
||||
resp_get_member,
|
||||
resp_get_user,
|
||||
resp_get_user_keys,
|
||||
resp_update_member,
|
||||
)
|
||||
except ImportError:
|
||||
pytestmark.append(pytest.mark.skip("Could not load gitlab module required for testing"))
|
||||
# Need to set these to something so that we don't fail when parsing
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.homebrew import HomebrewValidate
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,13 +4,12 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
from ansible_collections.community.general.plugins.modules.homebrew_cask import (
|
||||
HomebrewCask,
|
||||
)
|
||||
from ansible_collections.community.general.plugins.module_utils.homebrew import (
|
||||
HomebrewValidate,
|
||||
)
|
||||
from ansible_collections.community.general.plugins.modules.homebrew_cask import (
|
||||
HomebrewCask,
|
||||
)
|
||||
|
||||
|
||||
def test_valid_cask_names():
|
||||
|
|
|
|||
|
|
@ -7,14 +7,16 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from unittest.mock import patch
|
||||
from ansible_collections.community.general.plugins.modules import icinga2_feature
|
||||
|
||||
from ansible.module_utils import basic
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
ModuleTestCase,
|
||||
set_module_args,
|
||||
)
|
||||
from ansible.module_utils import basic
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import icinga2_feature
|
||||
|
||||
|
||||
def get_bin_path(*args, **kwargs):
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ from unittest.mock import Mock, patch
|
|||
|
||||
from ansible_collections.community.general.plugins.modules.ip2location_info import Ip2LocationInfo
|
||||
|
||||
|
||||
IP2LOCATION_DATA = {
|
||||
"ip": "8.8.8.8",
|
||||
"country_code": "US",
|
||||
|
|
|
|||
|
|
@ -6,13 +6,15 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from unittest.mock import call, patch
|
||||
from ansible_collections.community.general.plugins.modules import ipa_getkeytab
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
ModuleTestCase,
|
||||
set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import ipa_getkeytab
|
||||
|
||||
|
||||
class IPAKeytabModuleTestCase(ModuleTestCase):
|
||||
module = ipa_getkeytab
|
||||
|
|
|
|||
|
|
@ -5,11 +5,10 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
|
||||
from ansible_collections.community.general.plugins.modules.ipbase_info import IpbaseInfo
|
||||
import unittest
|
||||
from unittest.mock import Mock
|
||||
|
||||
from ansible_collections.community.general.plugins.modules.ipbase_info import IpbaseInfo
|
||||
|
||||
IPBASE_DATA = {
|
||||
"response": b"""
|
||||
|
|
|
|||
|
|
@ -7,13 +7,14 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
from unittest.mock import patch, Mock
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule # noqa: F401 # pylint: disable=unused-import
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
ModuleTestCase,
|
||||
set_module_args,
|
||||
)
|
||||
from ansible.module_utils.basic import AnsibleModule # noqa: F401 # pylint: disable=unused-import
|
||||
|
||||
from ansible_collections.community.general.plugins.modules.java_keystore import JavaKeystore, create_module
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,15 +8,16 @@ import unittest
|
|||
from unittest.mock import patch
|
||||
|
||||
from ansible.module_utils import basic
|
||||
from ansible_collections.community.general.plugins.modules import jenkins_build
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
set_module_args,
|
||||
exit_json,
|
||||
fail_json,
|
||||
set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import jenkins_build
|
||||
|
||||
|
||||
class jenkins:
|
||||
class JenkinsException(Exception):
|
||||
|
|
|
|||
|
|
@ -8,15 +8,16 @@ import unittest
|
|||
from unittest.mock import patch
|
||||
|
||||
from ansible.module_utils import basic
|
||||
from ansible_collections.community.general.plugins.modules import jenkins_build_info
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
set_module_args,
|
||||
exit_json,
|
||||
fail_json,
|
||||
set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import jenkins_build_info
|
||||
|
||||
|
||||
class jenkins:
|
||||
class JenkinsException(Exception):
|
||||
|
|
|
|||
|
|
@ -4,16 +4,15 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import jenkins_credential
|
||||
from unittest.mock import (
|
||||
MagicMock,
|
||||
patch,
|
||||
mock_open,
|
||||
)
|
||||
|
||||
import builtins
|
||||
import json
|
||||
from unittest.mock import (
|
||||
MagicMock,
|
||||
mock_open,
|
||||
patch,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import jenkins_credential
|
||||
|
||||
|
||||
def test_validate_file_exist_passes_when_file_exists():
|
||||
|
|
|
|||
|
|
@ -4,22 +4,21 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import jenkins
|
||||
|
||||
from unittest.mock import patch, call
|
||||
from unittest.mock import call, patch
|
||||
from xml.etree import ElementTree as et
|
||||
|
||||
import jenkins
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import jenkins_node
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
set_module_args,
|
||||
exit_json,
|
||||
fail_json,
|
||||
set_module_args,
|
||||
)
|
||||
from pytest import fixture, raises, mark, param
|
||||
from pytest import fixture, mark, param, raises
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import jenkins_node
|
||||
|
||||
|
||||
def xml_equal(x, y):
|
||||
|
|
|
|||
|
|
@ -4,18 +4,19 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from io import BytesIO
|
||||
import json
|
||||
from collections import OrderedDict
|
||||
from collections.abc import Mapping
|
||||
from io import BytesIO
|
||||
from unittest.mock import (
|
||||
MagicMock,
|
||||
patch,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.modules.jenkins_plugin import JenkinsPlugin
|
||||
from ansible.module_utils.urls import basic_auth_header
|
||||
|
||||
from ansible_collections.community.general.plugins.modules.jenkins_plugin import JenkinsPlugin
|
||||
|
||||
|
||||
def pass_function(*args, **kwargs):
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -5,8 +5,10 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from contextlib import contextmanager
|
||||
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
ModuleTestCase,
|
||||
|
|
@ -15,9 +17,6 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
|
||||
from ansible_collections.community.general.plugins.modules import keycloak_authentication
|
||||
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
|
||||
|
||||
@contextmanager
|
||||
def patch_keycloak_api(
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from contextlib import contextmanager
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
|
|
@ -15,9 +17,6 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
|
||||
from ansible_collections.community.general.plugins.modules import keycloak_authentication_required_actions
|
||||
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
|
||||
|
||||
@contextmanager
|
||||
def patch_keycloak_api(
|
||||
|
|
|
|||
|
|
@ -4,10 +4,11 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
from contextlib import contextmanager
|
||||
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
ModuleTestCase,
|
||||
|
|
@ -16,9 +17,6 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
|
||||
from ansible_collections.community.general.plugins.modules import keycloak_client
|
||||
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
|
||||
|
||||
@contextmanager
|
||||
def patch_keycloak_api(
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from contextlib import contextmanager
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
|
|
@ -15,9 +17,6 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
|
||||
from ansible_collections.community.general.plugins.modules import keycloak_client_rolemapping
|
||||
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
|
||||
|
||||
@contextmanager
|
||||
def patch_keycloak_api(
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from contextlib import contextmanager
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
|
|
@ -15,9 +17,6 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
|
||||
from ansible_collections.community.general.plugins.modules import keycloak_clientscope
|
||||
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
|
||||
|
||||
@contextmanager
|
||||
def patch_keycloak_api(
|
||||
|
|
|
|||
|
|
@ -9,14 +9,13 @@ from io import StringIO
|
|||
from itertools import count
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import keycloak_realm_key
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
ModuleTestCase,
|
||||
set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import keycloak_component
|
||||
from ansible_collections.community.general.plugins.modules import keycloak_component, keycloak_realm_key
|
||||
|
||||
|
||||
@contextmanager
|
||||
|
|
|
|||
|
|
@ -5,8 +5,10 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from contextlib import contextmanager
|
||||
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
ModuleTestCase,
|
||||
|
|
@ -15,9 +17,6 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
|
||||
from ansible_collections.community.general.plugins.modules import keycloak_identity_provider
|
||||
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
|
||||
|
||||
@contextmanager
|
||||
def patch_keycloak_api(
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from contextlib import contextmanager
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
|
|
@ -15,9 +17,6 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
|
||||
from ansible_collections.community.general.plugins.modules import keycloak_realm
|
||||
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
|
||||
|
||||
@contextmanager
|
||||
def patch_keycloak_api(get_realm_by_id, create_realm=None, update_realm=None, delete_realm=None):
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from contextlib import contextmanager
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
|
|
@ -15,9 +17,6 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
|
||||
from ansible_collections.community.general.plugins.modules import keycloak_realm_info
|
||||
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
|
||||
|
||||
@contextmanager
|
||||
def patch_keycloak_api(get_realm_info_by_id):
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from contextlib import contextmanager
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
|
|
@ -15,9 +17,6 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
|
||||
from ansible_collections.community.general.plugins.modules import keycloak_realm_key
|
||||
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
|
||||
|
||||
@contextmanager
|
||||
def patch_keycloak_api(
|
||||
|
|
|
|||
|
|
@ -9,13 +9,14 @@ from io import StringIO
|
|||
from itertools import count
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import keycloak_realm_keys_metadata_info
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
ModuleTestCase,
|
||||
set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import keycloak_realm_keys_metadata_info
|
||||
|
||||
|
||||
@contextmanager
|
||||
def patch_keycloak_api(side_effect):
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from contextlib import contextmanager
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
|
|
@ -15,9 +17,6 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
|
||||
from ansible_collections.community.general.plugins.modules import keycloak_role
|
||||
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
|
||||
|
||||
@contextmanager
|
||||
def patch_keycloak_api(
|
||||
|
|
|
|||
|
|
@ -4,10 +4,11 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
from contextlib import contextmanager
|
||||
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
ModuleTestCase,
|
||||
|
|
@ -16,9 +17,6 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
|
||||
from ansible_collections.community.general.plugins.modules import keycloak_user
|
||||
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
|
||||
|
||||
@contextmanager
|
||||
def patch_keycloak_api(
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from contextlib import contextmanager
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
|
|
@ -18,9 +20,6 @@ from ansible_collections.community.general.plugins.modules import (
|
|||
keycloak_user_execute_actions_email as module_under_test,
|
||||
)
|
||||
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
|
||||
|
||||
def _create_wrapper(text_as_string):
|
||||
def _wrapper():
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from contextlib import contextmanager
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
|
|
@ -15,9 +17,6 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
|
||||
from ansible_collections.community.general.plugins.modules import keycloak_user_federation
|
||||
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
|
||||
|
||||
@contextmanager
|
||||
def patch_keycloak_api(
|
||||
|
|
|
|||
|
|
@ -5,6 +5,9 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from contextlib import contextmanager
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
from json import dumps
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
|
|
@ -15,11 +18,6 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
|
||||
from ansible_collections.community.general.plugins.modules import keycloak_userprofile
|
||||
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
|
||||
from json import dumps
|
||||
|
||||
|
||||
@contextmanager
|
||||
def patch_keycloak_api(
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import krb_ticket
|
||||
from .uthelper import UTHelper, RunCommandMock
|
||||
|
||||
from .uthelper import RunCommandMock, UTHelper
|
||||
|
||||
UTHelper.from_module(krb_ticket, __name__, mocks=[RunCommandMock])
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import set_module_args
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import linode
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import set_module_args
|
||||
|
||||
from .linode_conftest import api_key, auth # noqa: F401, pylint: disable=unused-import
|
||||
|
||||
|
|
|
|||
|
|
@ -12,14 +12,19 @@ import pytest
|
|||
|
||||
linode_apiv4 = pytest.importorskip("linode_api4")
|
||||
|
||||
from linode_api4.errors import ApiError as LinodeApiError
|
||||
from linode_api4 import LinodeClient
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import linode_v4
|
||||
from ansible_collections.community.general.plugins.module_utils.linode import get_user_agent
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import set_module_args
|
||||
from linode_api4 import LinodeClient
|
||||
from linode_api4.errors import ApiError as LinodeApiError
|
||||
|
||||
from .linode_conftest import access_token, no_access_token_in_env, default_args, mock_linode # noqa: F401, pylint: disable=unused-import
|
||||
from ansible_collections.community.general.plugins.module_utils.linode import get_user_agent
|
||||
from ansible_collections.community.general.plugins.modules import linode_v4
|
||||
|
||||
from .linode_conftest import ( # noqa: F401, pylint: disable=unused-import
|
||||
access_token,
|
||||
default_args,
|
||||
mock_linode,
|
||||
no_access_token_in_env,
|
||||
)
|
||||
|
||||
|
||||
def test_mandatory_state_is_validated(capfd):
|
||||
|
|
|
|||
|
|
@ -5,14 +5,15 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from unittest.mock import patch
|
||||
from ansible_collections.community.general.plugins.modules import lvg_rename
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleFailJson,
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
ModuleTestCase,
|
||||
set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import lvg_rename
|
||||
|
||||
VGS_OUTPUT = """\
|
||||
vg_data_testhost1;XKZ5gn-YhWY-NlrT-QCFN-qmMG-VGT9-7uOmex
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import json
|
|||
from unittest import mock
|
||||
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import lxca_cmms
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import json
|
|||
from unittest import mock
|
||||
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import lxca_nodes
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ from __future__ import annotations
|
|||
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import lxd_storage_pool_info as module
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
|
|
@ -14,6 +13,8 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import lxd_storage_pool_info as module
|
||||
|
||||
|
||||
class FakeLXDClient:
|
||||
responses: dict[tuple[str, str], dict] = {}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ from __future__ import annotations
|
|||
|
||||
from unittest.mock import patch
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import lxd_storage_volume_info as module
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
|
|
@ -14,6 +13,8 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import lxd_storage_volume_info as module
|
||||
|
||||
|
||||
class FakeLXDClient:
|
||||
responses: dict[tuple[str, str], dict] = {}
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import macports
|
||||
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import macports
|
||||
|
||||
TESTED_MODULE = macports.__name__
|
||||
|
||||
QUERY_PORT_TEST_CASES = [
|
||||
|
|
|
|||
|
|
@ -4,10 +4,9 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import maven_artifact
|
||||
from ansible.module_utils import basic
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import maven_artifact
|
||||
|
||||
pytestmark = pytest.mark.usefixtures("patch_ansible_module")
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,13 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from unittest.mock import patch, Mock, mock_open
|
||||
from unittest.mock import Mock, mock_open, patch
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
ModuleTestCase,
|
||||
set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.modules.modprobe import Modprobe, build_module
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,13 +8,12 @@ import unittest
|
|||
from unittest import mock
|
||||
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import monit
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import monit
|
||||
|
||||
TEST_OUTPUT = """
|
||||
%s '%s'
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ from __future__ import annotations
|
|||
import json
|
||||
|
||||
import pytest
|
||||
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible_collections.community.general.plugins.modules import nmcli
|
||||
from ansible.module_utils.basic import AnsibleModule # noqa: F401 # pylint: disable=unused-import
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import nmcli
|
||||
|
||||
pytestmark = pytest.mark.usefixtures("patch_ansible_module")
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ from __future__ import annotations
|
|||
from unittest.mock import patch
|
||||
|
||||
import nomad
|
||||
from ansible_collections.community.general.plugins.modules import nomad_token
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
|
|
@ -15,6 +14,8 @@ from ansible_collections.community.internal_test_tools.tests.unit.plugins.module
|
|||
set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import nomad_token
|
||||
|
||||
|
||||
def mock_acl_get_tokens(empty_list=False):
|
||||
response_object = []
|
||||
|
|
|
|||
|
|
@ -7,13 +7,14 @@ from __future__ import annotations
|
|||
|
||||
from unittest.mock import call, patch
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import npm
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
ModuleTestCase,
|
||||
set_module_args,
|
||||
)
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import npm
|
||||
|
||||
|
||||
class NPMModuleTestCase(ModuleTestCase):
|
||||
module = npm
|
||||
|
|
|
|||
|
|
@ -12,17 +12,15 @@ from unittest.mock import patch
|
|||
from urllib.parse import urljoin
|
||||
|
||||
from ansible.module_utils import basic
|
||||
import ansible_collections.community.general.plugins.modules.ocapi_command as module
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
)
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
set_module_args,
|
||||
exit_json,
|
||||
fail_json,
|
||||
set_module_args,
|
||||
)
|
||||
|
||||
import ansible_collections.community.general.plugins.modules.ocapi_command as module
|
||||
|
||||
MOCK_BASE_URI = "mockBaseUri/"
|
||||
OPERATING_SYSTEM_URI = "OperatingSystem"
|
||||
|
|
|
|||
|
|
@ -8,17 +8,16 @@ import unittest
|
|||
from unittest.mock import patch
|
||||
|
||||
from ansible.module_utils import basic
|
||||
import ansible_collections.community.general.plugins.modules.ocapi_info as module
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
AnsibleExitJson,
|
||||
AnsibleFailJson,
|
||||
)
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import (
|
||||
set_module_args,
|
||||
exit_json,
|
||||
fail_json,
|
||||
set_module_args,
|
||||
)
|
||||
|
||||
import ansible_collections.community.general.plugins.modules.ocapi_info as module
|
||||
|
||||
MOCK_BASE_URI = "mockBaseUri"
|
||||
MOCK_JOB_NAME_IN_PROGRESS = "MockJobInProgress"
|
||||
MOCK_JOB_NAME_COMPLETE = "MockJobComplete"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import pytest
|
|||
|
||||
from ansible_collections.community.general.plugins.modules.one_vm import parse_updateconf
|
||||
|
||||
|
||||
PARSE_UPDATECONF_VALID = [
|
||||
(
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,9 +7,10 @@ from __future__ import annotations
|
|||
import pytest
|
||||
|
||||
from .hpe_test_utils import FactsParamsTest
|
||||
from .oneview_conftest import mock_ov_client, mock_ansible_module # noqa: F401, pylint: disable=unused-import
|
||||
from .oneview_conftest import mock_ansible_module, mock_ov_client # noqa: F401, pylint: disable=unused-import
|
||||
|
||||
from ansible_collections.community.general.plugins.modules.oneview_datacenter_info import DatacenterInfoModule
|
||||
# This import must come *after* the oneview_module_loader / hpe_test_utils import!
|
||||
from ansible_collections.community.general.plugins.modules.oneview_datacenter_info import DatacenterInfoModule # isort: skip
|
||||
|
||||
PARAMS_GET_CONNECTED = dict(config="config.json", name="MyDatacenter", options=["visualContent"])
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
|
||||
from .hpe_test_utils import FactsParamsTestCase
|
||||
|
||||
import unittest
|
||||
from ansible_collections.community.general.plugins.modules.oneview_enclosure_info import EnclosureInfoModule
|
||||
|
||||
# This import must come *after* the oneview_module_loader / hpe_test_utils import!
|
||||
from ansible_collections.community.general.plugins.modules.oneview_enclosure_info import EnclosureInfoModule # isort: skip
|
||||
|
||||
ERROR_MSG = "Fake message error"
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ from unittest import mock
|
|||
|
||||
import yaml
|
||||
|
||||
from .oneview_module_loader import EthernetNetworkModule
|
||||
from .hpe_test_utils import OneViewBaseTestCase
|
||||
from .oneview_module_loader import EthernetNetworkModule
|
||||
|
||||
FAKE_MSG_ERROR = "Fake message error"
|
||||
DEFAULT_ETHERNET_NAME = "Test Ethernet Network"
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ from __future__ import annotations
|
|||
|
||||
import unittest
|
||||
|
||||
from .oneview_module_loader import EthernetNetworkInfoModule
|
||||
from .hpe_test_utils import FactsParamsTestCase
|
||||
from .oneview_module_loader import EthernetNetworkInfoModule
|
||||
|
||||
ERROR_MSG = "Fake message error"
|
||||
|
||||
|
|
|
|||
|
|
@ -6,8 +6,9 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from .oneview_module_loader import FcNetworkModule
|
||||
|
||||
from .hpe_test_utils import OneViewBaseTestCase
|
||||
from .oneview_module_loader import FcNetworkModule
|
||||
|
||||
FAKE_MSG_ERROR = "Fake message error"
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,9 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from .oneview_module_loader import FcNetworkInfoModule
|
||||
|
||||
from .hpe_test_utils import FactsParamsTestCase
|
||||
from .oneview_module_loader import FcNetworkInfoModule
|
||||
|
||||
ERROR_MSG = "Fake message error"
|
||||
|
||||
|
|
|
|||
|
|
@ -6,8 +6,9 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from .oneview_module_loader import FcoeNetworkModule
|
||||
|
||||
from .hpe_test_utils import OneViewBaseTestCase
|
||||
from .oneview_module_loader import FcoeNetworkModule
|
||||
|
||||
FAKE_MSG_ERROR = "Fake message error"
|
||||
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ from __future__ import annotations
|
|||
|
||||
import unittest
|
||||
|
||||
from .oneview_module_loader import FcoeNetworkInfoModule
|
||||
from .hpe_test_utils import FactsParamsTestCase
|
||||
from .oneview_module_loader import FcoeNetworkInfoModule
|
||||
|
||||
ERROR_MSG = "Fake message error"
|
||||
|
||||
|
|
|
|||
|
|
@ -9,11 +9,12 @@ from copy import deepcopy
|
|||
from unittest import mock
|
||||
|
||||
from .hpe_test_utils import OneViewBaseTestCase
|
||||
from ansible_collections.community.general.plugins.modules.oneview_logical_interconnect_group import (
|
||||
|
||||
# This import must come *after* the oneview_module_loader / hpe_test_utils import!
|
||||
from ansible_collections.community.general.plugins.modules.oneview_logical_interconnect_group import ( # isort: skip
|
||||
LogicalInterconnectGroupModule,
|
||||
)
|
||||
|
||||
|
||||
FAKE_MSG_ERROR = "Fake message error"
|
||||
|
||||
DEFAULT_LIG_NAME = "Test Logical Interconnect Group"
|
||||
|
|
|
|||
|
|
@ -5,12 +5,14 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
|
||||
from .hpe_test_utils import FactsParamsTestCase
|
||||
from ansible_collections.community.general.plugins.modules.oneview_logical_interconnect_group_info import (
|
||||
|
||||
# This import must come *after* the oneview_module_loader / hpe_test_utils import!
|
||||
from ansible_collections.community.general.plugins.modules.oneview_logical_interconnect_group_info import ( # isort: skip
|
||||
LogicalInterconnectGroupInfoModule,
|
||||
)
|
||||
|
||||
|
||||
ERROR_MSG = "Fake message error"
|
||||
|
||||
PARAMS_GET_ALL = dict(config="config.json", name=None)
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ from __future__ import annotations
|
|||
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
from .hpe_test_utils import OneViewBaseTestCase
|
||||
from .oneview_module_loader import NetworkSetModule
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue