1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix unit test relative imports, and permissions for included collection requirements (#29)

* Fix Hetzner firewall unit test imports.

* Make sure tests can actually access collections.

* Fix more relative imports.

* Fix more relative imports.

* Fix more includes.

* Fix more tests.

* One more.

* Fix syntax error in sanity import tests (invalid escape sequence "\$" caused by non-raw docs block)

* Fix permissions of ansible-test parts for sanity tests.

* Revert "Fix permissions of ansible-test parts for sanity tests."

This reverts commit c2713f0a12.
This commit is contained in:
Felix Fontein 2020-03-24 09:27:28 +01:00 committed by GitHub
parent 676bec5484
commit c012d0fba7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
202 changed files with 239 additions and 233 deletions

View file

@ -14,7 +14,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'supported_by': 'community'}
DOCUMENTATION = '''
DOCUMENTATION = r'''
---
module: udm_user
author:

View file

@ -1,6 +1,6 @@
import unittest
from ansible_collections.community.general.plugins.modules.cloud.google._gcp_forwarding_rule import _build_global_forwarding_rule_dict
from ansible_collections.community.general.plugins.modules.cloud.google.gcp_forwarding_rule import _build_global_forwarding_rule_dict
class TestGCPFowardingRule(unittest.TestCase):

View file

@ -1,6 +1,6 @@
import unittest
from ansible_collections.community.general.plugins.modules.cloud.google._gcp_url_map import _build_path_matchers, _build_url_map_dict
from ansible_collections.community.general.plugins.modules.cloud.google.gcp_url_map import _build_path_matchers, _build_url_map_dict
class TestGCPUrlMap(unittest.TestCase):

View file

@ -10,7 +10,7 @@ __metaclass__ = type
import json
import pytest
from ..common import fake_xenapi_ref
from .common import fake_xenapi_ref
pytestmark = pytest.mark.usefixtures('patch_ansible_module')

View file

@ -10,7 +10,7 @@ __metaclass__ = type
import json
import pytest
from ..common import fake_xenapi_ref
from .common import fake_xenapi_ref
testcase_set_powerstate = {

View file

@ -23,7 +23,7 @@ __metaclass__ = type
from ansible_collections.community.general.plugins.modules.net_tools.nios import nios_a_record
from ansible_collections.community.general.plugins.module_utils.net_tools.nios import api
from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock, Mock
from ..test_nios_module import TestNiosModule, load_fixture
from .test_nios_module import TestNiosModule, load_fixture
class TestNiosARecordModule(TestNiosModule):

View file

@ -23,7 +23,7 @@ __metaclass__ = type
from ansible_collections.community.general.plugins.modules.net_tools.nios import nios_aaaa_record
from ansible_collections.community.general.plugins.module_utils.net_tools.nios import api
from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock, Mock
from ..test_nios_module import TestNiosModule, load_fixture
from .test_nios_module import TestNiosModule, load_fixture
class TestNiosAAAARecordModule(TestNiosModule):

View file

@ -23,7 +23,7 @@ __metaclass__ = type
from ansible_collections.community.general.plugins.modules.net_tools.nios import nios_cname_record
from ansible_collections.community.general.plugins.module_utils.net_tools.nios import api
from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock, Mock
from ..test_nios_module import TestNiosModule, load_fixture
from .test_nios_module import TestNiosModule, load_fixture
class TestNiosCNameRecordModule(TestNiosModule):

View file

@ -23,7 +23,7 @@ __metaclass__ = type
from ansible_collections.community.general.plugins.modules.net_tools.nios import nios_dns_view
from ansible_collections.community.general.plugins.module_utils.net_tools.nios import api
from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock, Mock
from ..test_nios_module import TestNiosModule, load_fixture
from .test_nios_module import TestNiosModule, load_fixture
class TestNiosDnsViewModule(TestNiosModule):

View file

@ -21,7 +21,7 @@ __metaclass__ = type
from ansible_collections.community.general.plugins.module_utils.net_tools.nios import api
from ansible_collections.community.general.plugins.modules.net_tools.nios import nios_fixed_address
from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock, Mock
from ..test_nios_module import TestNiosModule, load_fixture
from .test_nios_module import TestNiosModule, load_fixture
class TestNiosFixedAddressModule(TestNiosModule):

View file

@ -21,7 +21,7 @@ __metaclass__ = type
from ansible_collections.community.general.plugins.modules.net_tools.nios import nios_host_record
from ansible_collections.community.general.plugins.module_utils.net_tools.nios import api
from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock, Mock
from ..test_nios_module import TestNiosModule, load_fixture
from .test_nios_module import TestNiosModule, load_fixture
class TestNiosHostRecordModule(TestNiosModule):

View file

@ -21,7 +21,7 @@ __metaclass__ = type
from ansible_collections.community.general.plugins.module_utils.net_tools.nios import api
from ansible_collections.community.general.plugins.modules.net_tools.nios import nios_member
from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock, Mock
from ..test_nios_module import TestNiosModule, load_fixture
from .test_nios_module import TestNiosModule, load_fixture
class TestNiosMemberModule(TestNiosModule):

View file

@ -23,7 +23,7 @@ __metaclass__ = type
from ansible_collections.community.general.plugins.modules.net_tools.nios import nios_mx_record
from ansible_collections.community.general.plugins.module_utils.net_tools.nios import api
from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock, Mock
from ..test_nios_module import TestNiosModule, load_fixture
from .test_nios_module import TestNiosModule, load_fixture
class TestNiosMXRecordModule(TestNiosModule):

View file

@ -23,7 +23,7 @@ __metaclass__ = type
from ansible_collections.community.general.plugins.modules.net_tools.nios import nios_naptr_record
from ansible_collections.community.general.plugins.module_utils.net_tools.nios import api
from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock, Mock
from ..test_nios_module import TestNiosModule, load_fixture
from .test_nios_module import TestNiosModule, load_fixture
class TestNiosNAPTRRecordModule(TestNiosModule):

View file

@ -21,7 +21,7 @@ __metaclass__ = type
from ansible_collections.community.general.plugins.module_utils.net_tools.nios import api
from ansible_collections.community.general.plugins.modules.net_tools.nios import nios_network
from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock, Mock
from ..test_nios_module import TestNiosModule, load_fixture
from .test_nios_module import TestNiosModule, load_fixture
class TestNiosNetworkModule(TestNiosModule):

View file

@ -23,7 +23,7 @@ __metaclass__ = type
from ansible_collections.community.general.plugins.modules.net_tools.nios import nios_network_view
from ansible_collections.community.general.plugins.module_utils.net_tools.nios import api
from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock, Mock
from ..test_nios_module import TestNiosModule, load_fixture
from .test_nios_module import TestNiosModule, load_fixture
class TestNiosNetworkViewModule(TestNiosModule):

View file

@ -21,7 +21,7 @@ __metaclass__ = type
from ansible_collections.community.general.plugins.modules.net_tools.nios import nios_nsgroup
from ansible_collections.community.general.plugins.module_utils.net_tools.nios import api
from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock, Mock
from ..test_nios_module import TestNiosModule, load_fixture
from .test_nios_module import TestNiosModule, load_fixture
class TestNiosNSGroupModule(TestNiosModule):

View file

@ -21,7 +21,7 @@ __metaclass__ = type
from ansible_collections.community.general.plugins.modules.net_tools.nios import nios_ptr_record
from ansible_collections.community.general.plugins.module_utils.net_tools.nios import api
from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock, Mock
from ..test_nios_module import TestNiosModule, load_fixture
from .test_nios_module import TestNiosModule, load_fixture
class TestNiosPTRRecordModule(TestNiosModule):

View file

@ -23,7 +23,7 @@ __metaclass__ = type
from ansible_collections.community.general.plugins.modules.net_tools.nios import nios_srv_record
from ansible_collections.community.general.plugins.module_utils.net_tools.nios import api
from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock, Mock
from ..test_nios_module import TestNiosModule, load_fixture
from .test_nios_module import TestNiosModule, load_fixture
class TestNiosSRVRecordModule(TestNiosModule):

View file

@ -23,7 +23,7 @@ __metaclass__ = type
from ansible_collections.community.general.plugins.modules.net_tools.nios import nios_zone
from ansible_collections.community.general.plugins.module_utils.net_tools.nios import api
from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock, Mock
from ..test_nios_module import TestNiosModule, load_fixture
from .test_nios_module import TestNiosModule, load_fixture
class TestNiosZoneModule(TestNiosModule):

View file

@ -9,7 +9,7 @@ import pytest
from ansible_collections.community.general.plugins.module_utils.hetzner import BASE_URL
from ansible_collections.community.general.plugins.modules.net_tools import hetzner_firewall_info
from ..test_hetzner_firewall import FetchUrlCall, run_module_success, run_module_failed
from .test_hetzner_firewall import FetchUrlCall, run_module_success, run_module_failed
# Tests for state (absent and present)

View file

@ -24,7 +24,7 @@ import json
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.aireos import aireos_command
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..aireos_module import TestCiscoWlcModule, load_fixture
from .aireos_module import TestCiscoWlcModule, load_fixture
from ansible.module_utils import six

View file

@ -23,7 +23,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.aireos import aireos_config
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..aireos_module import TestCiscoWlcModule, load_fixture
from .aireos_module import TestCiscoWlcModule, load_fixture
class TestCiscoWlcConfigModule(TestCiscoWlcModule):

View file

@ -24,7 +24,7 @@ import json
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.apconos import apconos_command
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..apconos_module import TestApconosModule, load_fixture
from .apconos_module import TestApconosModule, load_fixture
class TestApconosCommandModule(TestApconosModule):

View file

@ -24,7 +24,7 @@ import json
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.aruba import aruba_command
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..aruba_module import TestArubaModule, load_fixture
from .aruba_module import TestArubaModule, load_fixture
class TestArubaCommandModule(TestArubaModule):

View file

@ -23,7 +23,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.aruba import aruba_config
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..aruba_module import TestArubaModule, load_fixture
from .aruba_module import TestArubaModule, load_fixture
class TestArubaConfigModule(TestArubaModule):

View file

@ -23,7 +23,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.cloudengine import ce_lacp
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..ce_module import TestCloudEngineModule, load_fixture
from .ce_module import TestCloudEngineModule, load_fixture
class TestCloudEngineLacpModule(TestCloudEngineModule):

View file

@ -20,7 +20,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.cnos import cnos_banner
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..cnos_module import TestCnosModule, load_fixture
from .cnos_module import TestCnosModule, load_fixture
class TestCnosBannerModule(TestCnosModule):

View file

@ -4,7 +4,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.cnos import cnos_bgp
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..cnos_module import TestCnosModule, load_fixture
from .cnos_module import TestCnosModule, load_fixture
class TestCnosBgpModule(TestCnosModule):

View file

@ -22,7 +22,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.cnos import cnos_command
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..cnos_module import TestCnosModule, load_fixture
from .cnos_module import TestCnosModule, load_fixture
class TestCnosCommandModule(TestCnosModule):

View file

@ -23,7 +23,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.cnos import cnos_config
from ..cnos_module import TestCnosModule, load_fixture
from .cnos_module import TestCnosModule, load_fixture
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args

View file

@ -22,7 +22,7 @@ __metaclass__ = type
import json
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ..cnos_module import TestCnosModule, load_fixture
from .cnos_module import TestCnosModule, load_fixture
from ansible_collections.community.general.plugins.modules.network.cnos import cnos_facts
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args

View file

@ -23,7 +23,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.cnos import cnos_interface
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..cnos_module import TestCnosModule, load_fixture
from .cnos_module import TestCnosModule, load_fixture
class TestCnosInterfaceModule(TestCnosModule):

View file

@ -22,7 +22,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.cnos import cnos_l2_interface
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..cnos_module import TestCnosModule, load_fixture
from .cnos_module import TestCnosModule, load_fixture
class TestCnosL2InterfaceModule(TestCnosModule):

View file

@ -22,7 +22,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.cnos import cnos_l3_interface
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..cnos_module import TestCnosModule, load_fixture
from .cnos_module import TestCnosModule, load_fixture
class TestCnosL3InterfaceModule(TestCnosModule):

View file

@ -23,7 +23,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.cnos import cnos_linkagg
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..cnos_module import TestCnosModule, load_fixture
from .cnos_module import TestCnosModule, load_fixture
class TestCnosLinkaggModule(TestCnosModule):

View file

@ -22,7 +22,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.cnos import cnos_lldp
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..cnos_module import TestCnosModule, load_fixture
from .cnos_module import TestCnosModule, load_fixture
class TestCnosLldpModule(TestCnosModule):

View file

@ -24,7 +24,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.cnos import cnos_logging
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..cnos_module import TestCnosModule, load_fixture
from .cnos_module import TestCnosModule, load_fixture
class TestCnosLoggingModule(TestCnosModule):

View file

@ -22,7 +22,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.cnos import cnos_static_route
from ..cnos_module import TestCnosModule, load_fixture
from .cnos_module import TestCnosModule, load_fixture
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args

View file

@ -24,7 +24,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.cnos import cnos_system
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..cnos_module import TestCnosModule, load_fixture
from .cnos_module import TestCnosModule, load_fixture
class TestCnosSystemModule(TestCnosModule):

View file

@ -20,7 +20,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.cnos import cnos_user
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..cnos_module import TestCnosModule, load_fixture
from .cnos_module import TestCnosModule, load_fixture
class TestCnosUserModule(TestCnosModule):

View file

@ -4,7 +4,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.cnos import cnos_vlag
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..cnos_module import TestCnosModule, load_fixture
from .cnos_module import TestCnosModule, load_fixture
class TestCnosVlagModule(TestCnosModule):

View file

@ -23,7 +23,7 @@ from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.cnos import cnos_vlan
from ansible_collections.community.general.plugins.modules.network.cnos.cnos_vlan import parse_vlan_brief
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..cnos_module import TestCnosModule, load_fixture
from .cnos_module import TestCnosModule, load_fixture
class TestCnosVlanModule(TestCnosModule):

View file

@ -22,7 +22,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.cnos import cnos_vrf
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..cnos_module import TestCnosModule, load_fixture
from .cnos_module import TestCnosModule, load_fixture
class TestCnosVrfModule(TestCnosModule):

View file

@ -24,7 +24,7 @@ import json
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.edgeos import edgeos_command
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..edgeos_module import TestEdgeosModule, load_fixture
from .edgeos_module import TestEdgeosModule, load_fixture
class TestEdgeosCommandModule(TestEdgeosModule):

View file

@ -23,7 +23,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.edgeos import edgeos_config
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..edgeos_module import TestEdgeosModule, load_fixture
from .edgeos_module import TestEdgeosModule, load_fixture
class TestEdgeosConfigModule(TestEdgeosModule):

View file

@ -24,7 +24,7 @@ import json
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.edgeos import edgeos_facts
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..edgeos_module import TestEdgeosModule, load_fixture
from .edgeos_module import TestEdgeosModule, load_fixture
class TestEdgeosFactsModule(TestEdgeosModule):

View file

@ -21,7 +21,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.edgeswitch import edgeswitch_facts
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..edgeswitch_module import TestEdgeswitchModule, load_fixture
from .edgeswitch_module import TestEdgeswitchModule, load_fixture
class TestEdgeswitchFactsModule(TestEdgeswitchModule):

View file

@ -22,7 +22,7 @@ from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.edgeswitch import edgeswitch_vlan
from ansible_collections.community.general.plugins.modules.network.edgeswitch.edgeswitch_vlan import parse_vlan_brief, parse_interfaces_switchport
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..edgeswitch_module import TestEdgeswitchModule, load_fixture
from .edgeswitch_module import TestEdgeswitchModule, load_fixture
class TestEdgeswitchVlanModule(TestEdgeswitchModule):

View file

@ -22,7 +22,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.enos import enos_command
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..enos_module import TestEnosModule, load_fixture
from .enos_module import TestEnosModule, load_fixture
class TestEnosCommandModule(TestEnosModule):

View file

@ -22,7 +22,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.enos import enos_config
from ..enos_module import TestEnosModule, load_fixture
from .enos_module import TestEnosModule, load_fixture
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args

View file

@ -22,7 +22,7 @@ __metaclass__ = type
import json
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ..enos_module import TestEnosModule, load_fixture
from .enos_module import TestEnosModule, load_fixture
from ansible_collections.community.general.plugins.modules.network.enos import enos_facts
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args

View file

@ -24,7 +24,7 @@ import json
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.eric_eccli import eric_eccli_command
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..eccli_module import TestEccliModule, load_fixture
from .eccli_module import TestEccliModule, load_fixture
class TestEccliCommandModule(TestEccliModule):

View file

@ -24,7 +24,7 @@ import json
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ansible_collections.community.general.plugins.modules.network.exos import exos_command
from ..exos_module import TestExosModule, load_fixture
from .exos_module import TestExosModule, load_fixture
class TestExosCommandModule(TestExosModule):

View file

@ -23,7 +23,7 @@ from ansible_collections.community.general.tests.unit.compat.mock import patch,
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ansible_collections.community.general.plugins.cliconf.exos import Cliconf
from ansible_collections.community.general.plugins.modules.network.exos import exos_config
from ..exos_module import TestExosModule, load_fixture
from .exos_module import TestExosModule, load_fixture
class TestExosConfigModule(TestExosModule):

View file

@ -26,7 +26,7 @@ from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ansible.module_utils.common._collections_compat import Mapping
from ansible_collections.community.general.plugins.modules.network.exos import exos_facts
from ..exos_module import TestExosModule
from .exos_module import TestExosModule
class TestExosFactsModule(TestExosModule):

View file

@ -28,10 +28,10 @@ try:
from test.unit.modules.utils import set_module_args
except ImportError:
try:
from ansible.modules.network.f5.bigip_security_address_list import ApiParameters
from ansible.modules.network.f5.bigip_security_address_list import ModuleParameters
from ansible.modules.network.f5.bigip_security_address_list import ModuleManager
from ansible.modules.network.f5.bigip_security_address_list import ArgumentSpec
from ansible_collections.community.general.plugins.modules.network.f5.bigip_security_address_list import ApiParameters
from ansible_collections.community.general.plugins.modules.network.f5.bigip_security_address_list import ModuleParameters
from ansible_collections.community.general.plugins.modules.network.f5.bigip_security_address_list import ModuleManager
from ansible_collections.community.general.plugins.modules.network.f5.bigip_security_address_list import ArgumentSpec
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
except ImportError:
pytestmark.append(pytest.mark.skip("F5 Ansible modules require the f5-sdk Python library"))

View file

@ -28,10 +28,10 @@ try:
from test.unit.modules.utils import set_module_args
except ImportError:
try:
from ansible.modules.network.f5.bigip_security_port_list import ApiParameters
from ansible.modules.network.f5.bigip_security_port_list import ModuleParameters
from ansible.modules.network.f5.bigip_security_port_list import ModuleManager
from ansible.modules.network.f5.bigip_security_port_list import ArgumentSpec
from ansible_collections.community.general.plugins.modules.network.f5.bigip_security_port_list import ApiParameters
from ansible_collections.community.general.plugins.modules.network.f5.bigip_security_port_list import ModuleParameters
from ansible_collections.community.general.plugins.modules.network.f5.bigip_security_port_list import ModuleManager
from ansible_collections.community.general.plugins.modules.network.f5.bigip_security_port_list import ArgumentSpec
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
except ImportError:
pytestmark.append(pytest.mark.skip("F5 Ansible modules require the f5-sdk Python library"))

View file

@ -47,7 +47,8 @@ def module_mock(mocker):
@pytest.fixture(autouse=True)
def connection_mock(mocker):
connection_class_mock = mocker.patch('ansible.modules.network.fortimanager.'
connection_class_mock = mocker.patch('ansible_collections.community.general.'
'plugins.modules.network.fortimanager.'
'fmgr_device_provision_template.Connection')
return connection_class_mock

View file

@ -24,7 +24,7 @@ import pytest
pytestmark = []
try:
from ansible_collections.community.general.plugins.modules.network.fortimanager import fmgr_provisioning
from ..fortimanager_module import TestFortimanagerModule
from .fortimanager_module import TestFortimanagerModule
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
except ImportError:
pytestmark.append(pytest.mark.skip("Could not load required modules for testing"))

View file

@ -5,7 +5,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.icx import icx_banner
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..icx_module import TestICXModule, load_fixture
from .icx_module import TestICXModule, load_fixture
class TestICXBannerModule(TestICXModule):

View file

@ -7,7 +7,7 @@ import json
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.icx import icx_command
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..icx_module import TestICXModule, load_fixture
from .icx_module import TestICXModule, load_fixture
class TestICXCommandModule(TestICXModule):

View file

@ -7,7 +7,7 @@ from ansible_collections.community.general.tests.unit.compat.mock import patch,
from ansible_collections.community.general.plugins.modules.network.icx import icx_config
from ansible_collections.community.general.plugins.cliconf.icx import Cliconf
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..icx_module import TestICXModule, load_fixture
from .icx_module import TestICXModule, load_fixture
class TestICXConfigModule(TestICXModule):

View file

@ -6,7 +6,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.icx import icx_copy
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..icx_module import TestICXModule, load_fixture
from .icx_module import TestICXModule, load_fixture
class TestICXSCPModule(TestICXModule):

View file

@ -6,7 +6,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.icx import icx_facts
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..icx_module import TestICXModule, load_fixture
from .icx_module import TestICXModule, load_fixture
class TestICXFactsModule(TestICXModule):

View file

@ -5,7 +5,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.icx import icx_interface
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..icx_module import TestICXModule, load_fixture
from .icx_module import TestICXModule, load_fixture
class TestICXInterfaceModule(TestICXModule):

View file

@ -6,7 +6,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.icx import icx_l3_interface
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..icx_module import TestICXModule, load_fixture
from .icx_module import TestICXModule, load_fixture
class TestICXFactsModule(TestICXModule):

View file

@ -6,7 +6,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.icx import icx_linkagg
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..icx_module import TestICXModule, load_fixture
from .icx_module import TestICXModule, load_fixture
class TestICXLinkaggModule(TestICXModule):

View file

@ -5,7 +5,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.icx import icx_lldp
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..icx_module import TestICXModule, load_fixture
from .icx_module import TestICXModule, load_fixture
class TestICXlldpModule(TestICXModule):

View file

@ -8,7 +8,7 @@ import json
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.icx import icx_logging
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..icx_module import TestICXModule, load_fixture
from .icx_module import TestICXModule, load_fixture
class TestICXLoggingModule(TestICXModule):

View file

@ -6,7 +6,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.icx import icx_ping
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..icx_module import TestICXModule, load_fixture
from .icx_module import TestICXModule, load_fixture
class TestICXPingModule(TestICXModule):

View file

@ -5,7 +5,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.icx import icx_static_route
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..icx_module import TestICXModule, load_fixture
from .icx_module import TestICXModule, load_fixture
class TestICXStaticRouteModule(TestICXModule):

View file

@ -8,7 +8,7 @@ import json
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.icx import icx_system
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..icx_module import TestICXModule, load_fixture
from .icx_module import TestICXModule, load_fixture
class TestICXSystemModule(TestICXModule):

View file

@ -6,7 +6,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.icx import icx_user
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..icx_module import TestICXModule, load_fixture
from .icx_module import TestICXModule, load_fixture
class TestICXSCPModule(TestICXModule):

View file

@ -5,7 +5,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.icx import icx_vlan
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..icx_module import TestICXModule, load_fixture
from .icx_module import TestICXModule, load_fixture
class TestICXVlanModule(TestICXModule):

View file

@ -25,7 +25,7 @@ import os
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.ingate import ig_config
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..ingate_module import TestIngateModule, load_fixture
from .ingate_module import TestIngateModule, load_fixture
class TestConfigModule(TestIngateModule):
@ -35,7 +35,8 @@ class TestConfigModule(TestIngateModule):
def setUp(self):
super(TestConfigModule, self).setUp()
self.mock_make_request = patch('ansible.modules.network.ingate.'
self.mock_make_request = patch('ansible_collections.community.general.'
'plugins.modules.network.ingate.'
'ig_config.make_request')
self.make_request = self.mock_make_request.start()
# ATM the Ingate Python SDK is not needed in this unit test.

View file

@ -11,7 +11,7 @@ import os
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.ingate import ig_unit_information
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..ingate_module import TestIngateModule, load_fixture
from .ingate_module import TestIngateModule, load_fixture
class TestUnitInformationModule(TestIngateModule):
@ -21,11 +21,13 @@ class TestUnitInformationModule(TestIngateModule):
def setUp(self):
super(TestUnitInformationModule, self).setUp()
self.mock_make_request = patch('ansible.modules.network.ingate.'
self.mock_make_request = patch('ansible_collections.community.general.'
'plugins.modules.network.ingate.'
'ig_unit_information.make_request')
self.make_request = self.mock_make_request.start()
self.mock_is_ingatesdk_installed = patch('ansible.modules.network.ingate.'
self.mock_is_ingatesdk_installed = patch('ansible_collections.community.general.'
'plugins.modules.network.ingate.'
'ig_unit_information.is_ingatesdk_installed')
self.is_ingatesdk_installed = self.mock_is_ingatesdk_installed.start()

View file

@ -22,7 +22,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ansible_collections.community.general.plugins.modules.network.ironware import ironware_command
from ..ironware_module import TestIronwareModule, load_fixture
from .ironware_module import TestIronwareModule, load_fixture
class TestIronwareCommandModule(TestIronwareModule):

View file

@ -23,7 +23,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ansible_collections.community.general.plugins.modules.network.ironware import ironware_config
from ..ironware_module import TestIronwareModule, load_fixture
from .ironware_module import TestIronwareModule, load_fixture
class TestIronwareConfigModule(TestIronwareModule):

View file

@ -24,7 +24,7 @@ import json
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ansible_collections.community.general.plugins.modules.network.ironware import ironware_facts
from ..ironware_module import TestIronwareModule, load_fixture
from .ironware_module import TestIronwareModule, load_fixture
class TestIronwareFacts(TestIronwareModule):

View file

@ -19,7 +19,7 @@
from ansible_collections.community.general.tests.unit.compat.mock import patch, Mock, MagicMock, call
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..netscaler_module import TestModule, nitro_base_patcher
from .netscaler_module import TestModule, nitro_base_patcher
import sys

View file

@ -26,7 +26,7 @@ if sys.version_info[:2] != (2, 6):
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..netscaler_module import TestModule, nitro_base_patcher
from .netscaler_module import TestModule, nitro_base_patcher
class TestNetscalerCSPolicyModule(TestModule):

View file

@ -19,7 +19,7 @@
from ansible_collections.community.general.tests.unit.compat.mock import patch, Mock, MagicMock, call
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..netscaler_module import TestModule, nitro_base_patcher
from .netscaler_module import TestModule, nitro_base_patcher
import sys

View file

@ -19,7 +19,7 @@
from ansible_collections.community.general.tests.unit.compat.mock import patch, Mock, MagicMock, call
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..netscaler_module import TestModule, nitro_base_patcher
from .netscaler_module import TestModule, nitro_base_patcher
import sys

View file

@ -19,7 +19,7 @@
from ansible_collections.community.general.tests.unit.compat.mock import patch, Mock, MagicMock, call
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..netscaler_module import TestModule, nitro_base_patcher
from .netscaler_module import TestModule, nitro_base_patcher
import sys

View file

@ -19,7 +19,7 @@
from ansible_collections.community.general.tests.unit.compat.mock import patch, Mock, MagicMock, call
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..netscaler_module import TestModule, nitro_base_patcher
from .netscaler_module import TestModule, nitro_base_patcher
import sys

View file

@ -19,7 +19,7 @@
from ansible_collections.community.general.tests.unit.compat.mock import patch, Mock, MagicMock, call
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..netscaler_module import TestModule, nitro_base_patcher
from .netscaler_module import TestModule, nitro_base_patcher
import sys

View file

@ -19,7 +19,7 @@
from ansible_collections.community.general.tests.unit.compat.mock import patch, Mock, MagicMock, call
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..netscaler_module import TestModule, nitro_base_patcher
from .netscaler_module import TestModule, nitro_base_patcher
import sys

View file

@ -18,7 +18,7 @@
#
from ansible_collections.community.general.tests.unit.compat.mock import patch, Mock, call
from ..netscaler_module import TestModule
from .netscaler_module import TestModule
import copy
import tempfile
import json

View file

@ -19,7 +19,7 @@
from ansible_collections.community.general.tests.unit.compat.mock import patch, Mock, call
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..netscaler_module import TestModule, nitro_base_patcher
from .netscaler_module import TestModule, nitro_base_patcher
import sys

View file

@ -19,7 +19,7 @@
from ansible_collections.community.general.tests.unit.compat.mock import patch, Mock, MagicMock, call
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..netscaler_module import TestModule, nitro_base_patcher
from .netscaler_module import TestModule, nitro_base_patcher
import sys

View file

@ -26,7 +26,7 @@ if sys.version_info[:2] != (2, 6):
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..netscaler_module import TestModule, nitro_base_patcher
from .netscaler_module import TestModule, nitro_base_patcher
class TestNetscalerServiceModule(TestModule):

View file

@ -26,7 +26,7 @@ if sys.version_info[:2] != (2, 6):
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..netscaler_module import TestModule, nitro_base_patcher
from .netscaler_module import TestModule, nitro_base_patcher
class TestNetscalerServicegroupModule(TestModule):

View file

@ -19,7 +19,7 @@
from ansible_collections.community.general.tests.unit.compat.mock import patch, Mock, MagicMock, call
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..netscaler_module import TestModule, nitro_base_patcher
from .netscaler_module import TestModule, nitro_base_patcher
import sys

View file

@ -7,7 +7,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.netvisor import pn_access_list_ip
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..nvos_module import TestNvosModule
from .nvos_module import TestNvosModule
class TestAccessListIpModule(TestNvosModule):

View file

@ -7,7 +7,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.netvisor import pn_admin_service
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..nvos_module import TestNvosModule
from .nvos_module import TestNvosModule
class TestAdminServiceModule(TestNvosModule):

View file

@ -7,7 +7,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.netvisor import pn_admin_session_timeout
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..nvos_module import TestNvosModule
from .nvos_module import TestNvosModule
class TestAdminServiceModule(TestNvosModule):

View file

@ -7,7 +7,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.netvisor import pn_admin_syslog
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..nvos_module import TestNvosModule
from .nvos_module import TestNvosModule
class TestAdminSyslogModule(TestNvosModule):

View file

@ -7,7 +7,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.netvisor import pn_connection_stats_settings
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..nvos_module import TestNvosModule
from .nvos_module import TestNvosModule
class TestAdminServiceModule(TestNvosModule):

View file

@ -7,7 +7,7 @@ __metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.netvisor import pn_cpu_class
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args
from ..nvos_module import TestNvosModule
from .nvos_module import TestNvosModule
class TestCpuClassModule(TestNvosModule):

Some files were not shown because too many files have changed in this diff Show more