Move unit test compat code out of lib/ansible/. (#46996)

* Move ansible.compat.tests to test/units/compat/.
* Fix unit test references to ansible.compat.tests.
* Move builtins compat to separate file.
* Fix classification of test/units/compat/ dir.
This commit is contained in:
Matt Clay 2018-10-12 20:01:14 -07:00 committed by GitHub
parent 6e2897647c
commit 3033fd96b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
462 changed files with 773 additions and 776 deletions

View file

@ -614,6 +614,11 @@ class PathMapper(object):
'units': path,
}
if path.startswith('test/units/compat/'):
return {
'units': 'test/units/',
}
# changes to files which are not unit tests should trigger tests from the nearest parent directory
test_path = os.path.dirname(path)

View file

@ -19,8 +19,8 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.compat.tests import unittest
from ansible.compat.tests.mock import patch, MagicMock
from units.compat import unittest
from units.compat.mock import patch, MagicMock
from units.mock.loader import DictDataLoader

View file

@ -19,8 +19,8 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.compat.tests import unittest
from ansible.compat.tests.mock import patch
from units.compat import unittest
from units.compat.mock import patch
from ansible.cli.console import ConsoleCLI

View file

@ -27,8 +27,8 @@ import tempfile
import yaml
from ansible.cli.galaxy import GalaxyCLI
from ansible.compat.tests import unittest
from ansible.compat.tests.mock import call, patch
from units.compat import unittest
from units.compat.mock import call, patch
from ansible.errors import AnsibleError, AnsibleOptionsError
from ansible.module_utils.six import PY3

View file

@ -19,7 +19,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.compat.tests import unittest
from units.compat import unittest
from units.mock.loader import DictDataLoader
from ansible.inventory.manager import InventoryManager

View file

@ -19,8 +19,8 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.compat.tests import unittest
from ansible.compat.tests.mock import patch
from units.compat import unittest
from units.compat.mock import patch
from units.mock.vault_helper import TextVaultSecret
from ansible import errors

View file

View file

@ -19,12 +19,6 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
'''
This module contains things that are only needed for compat in the testsuites,
not in ansible itself. If you are not installing the test suite, you can
safely remove this subdirectory.
'''
#
# Compat for python2.7
#

View file

@ -2,7 +2,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.compat.tests import unittest
from units.compat import unittest
from ansible.config.data import ConfigData
from ansible.config.manager import Setting

View file

@ -5,7 +5,7 @@ __metaclass__ = type
import os
import os.path
from ansible.compat.tests import unittest
from units.compat import unittest
from ansible.config.manager import ConfigManager, Setting, ensure_type, resolve_path, find_ini_config_file

View file

@ -20,8 +20,9 @@ from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.compat.tests import BUILTINS, unittest
from ansible.compat.tests.mock import mock_open, patch
from units.compat import unittest
from units.compat.builtins import BUILTINS
from units.compat.mock import mock_open, patch
from ansible.errors import AnsibleError
from ansible.parsing.yaml.objects import AnsibleBaseYAMLObject

View file

@ -19,8 +19,8 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.compat.tests import unittest
from ansible.compat.tests.mock import patch, MagicMock
from units.compat import unittest
from units.compat.mock import patch, MagicMock
from ansible.errors import AnsibleError, AnsibleParserError
from ansible.executor.play_iterator import HostState, PlayIterator

View file

@ -19,8 +19,8 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.compat.tests import unittest
from ansible.compat.tests.mock import MagicMock
from units.compat import unittest
from units.compat.mock import MagicMock
from ansible.executor.playbook_executor import PlaybookExecutor
from ansible.playbook import Playbook
from ansible.template import Templar

View file

@ -19,8 +19,8 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.compat.tests import unittest
from ansible.compat.tests.mock import patch, MagicMock
from units.compat import unittest
from units.compat.mock import patch, MagicMock
from ansible.errors import AnsibleError, AnsibleParserError
from ansible.executor.task_executor import TaskExecutor, remove_omit
from ansible.playbook.play_context import PlayContext

View file

@ -18,8 +18,8 @@
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
from ansible.compat.tests import unittest
from ansible.compat.tests.mock import MagicMock
from units.compat import unittest
from units.compat.mock import MagicMock
from ansible.executor.task_queue_manager import TaskQueueManager
from ansible.playbook import Playbook
from ansible.plugins.callback import CallbackBase

View file

@ -19,8 +19,8 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.compat.tests import unittest
from ansible.compat.tests.mock import patch, MagicMock
from units.compat import unittest
from units.compat.mock import patch, MagicMock
from ansible.executor.task_result import TaskResult

View file

@ -1,4 +1,4 @@
from ansible.compat.tests.mock import MagicMock
from units.compat.mock import MagicMock
from ansible.utils.path import unfrackpath

View file

@ -25,7 +25,7 @@ import json
from contextlib import contextmanager
from io import BytesIO, StringIO
from ansible.compat.tests import unittest
from units.compat import unittest
from ansible.module_utils.six import PY3
from ansible.module_utils._text import to_bytes

View file

@ -23,7 +23,7 @@ import unittest
from ansible.module_utils import basic
from ansible.module_utils.aws.core import AnsibleAWSModule
from ansible.module_utils._text import to_bytes
from ansible.compat.tests.mock import Mock, patch
from units.compat.mock import Mock, patch
import json
importorskip("boto3")

View file

@ -12,7 +12,7 @@ import os
import pytest
from ansible.compat.tests.mock import MagicMock, patch
from units.compat.mock import MagicMock, patch
from ansible.module_utils import basic
from ansible.module_utils.six import string_types
from ansible.module_utils.six.moves import builtins

View file

@ -9,7 +9,7 @@ __metaclass__ = type
from units.mock.procenv import ModuleTestCase
from ansible.compat.tests.mock import patch, MagicMock
from units.compat.mock import patch, MagicMock
from ansible.module_utils.six.moves import builtins
realimport = builtins.__import__

View file

@ -9,7 +9,7 @@ __metaclass__ = type
from units.mock.procenv import ModuleTestCase
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.module_utils.six.moves import builtins
realimport = builtins.__import__

View file

@ -20,7 +20,7 @@
from __future__ import (absolute_import, division)
__metaclass__ = type
from ansible.compat.tests import unittest
from units.compat import unittest
from ansible.module_utils.basic import heuristic_log_sanitize

View file

@ -11,8 +11,8 @@ import sys
from units.mock.procenv import ModuleTestCase
from ansible.compat.tests import unittest
from ansible.compat.tests.mock import patch, MagicMock
from units.compat import unittest
from units.compat.mock import patch, MagicMock
from ansible.module_utils.six.moves import builtins
realimport = builtins.__import__

View file

@ -6,7 +6,7 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
from ansible.compat.tests import unittest
from units.compat import unittest
from ansible.module_utils.basic import return_values, remove_values

View file

@ -9,7 +9,7 @@ __metaclass__ = type
from units.mock.procenv import ModuleTestCase
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.module_utils.six.moves import builtins
realimport = builtins.__import__

View file

@ -12,7 +12,7 @@ import json
from units.mock.procenv import ModuleTestCase, swap_stdin_and_argv
from ansible.compat.tests.mock import patch, MagicMock, mock_open, Mock
from units.compat.mock import patch, MagicMock, mock_open, Mock
from ansible.module_utils.six.moves import builtins
realimport = builtins.__import__

View file

@ -13,7 +13,7 @@ import tempfile
import pytest
from ansible.compat.tests.mock import patch, MagicMock
from units.compat.mock import patch, MagicMock
from ansible.module_utils._text import to_bytes
from ansible.module_utils import basic

View file

@ -1,6 +1,6 @@
import random
from ansible.compat.tests import unittest
from units.compat import unittest
from ansible.module_utils.cloud import _exponential_backoff, \
_full_jitter_backoff

View file

@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
from ansible.compat.tests import unittest
from units.compat import unittest
from ansible.module_utils.common.dict_transformations import _camel_to_snake, _snake_to_camel, camel_dict_to_snake_dict, dict_merge
EXPECTED_SNAKIFICATION = {

View file

@ -25,7 +25,7 @@ except:
from nose.plugins.skip import SkipTest
from ansible.compat.tests import unittest
from units.compat import unittest
from ansible.module_utils.ec2 import AWSRetry
if not HAS_BOTO3:

View file

@ -19,8 +19,8 @@
from __future__ import (absolute_import, division)
__metaclass__ = type
from ansible.compat.tests import unittest
from ansible.compat.tests.mock import Mock
from units.compat import unittest
from units.compat.mock import Mock
class BaseFactsTest(unittest.TestCase):

View file

@ -18,8 +18,8 @@ __metaclass__ = type
import os
from ansible.compat.tests import unittest
from ansible.compat.tests.mock import Mock, patch
from units.compat import unittest
from units.compat.mock import Mock, patch
from ansible.module_utils.facts import timeout

View file

@ -18,8 +18,8 @@
from __future__ import (absolute_import, division)
__metaclass__ = type
from ansible.compat.tests.mock import Mock
from ansible.compat.tests import unittest
from units.compat.mock import Mock
from units.compat import unittest
from ansible.module_utils.facts.network import generic_bsd

View file

@ -19,7 +19,7 @@
from __future__ import (absolute_import, division)
__metaclass__ = type
from ansible.compat.tests.mock import Mock, patch
from units.compat.mock import Mock, patch
from .. base import BaseFactsTest

View file

@ -19,7 +19,7 @@
from __future__ import (absolute_import, division)
__metaclass__ = type
from ansible.compat.tests.mock import Mock, patch
from units.compat.mock import Mock, patch
from .. base import BaseFactsTest

View file

@ -19,7 +19,7 @@
from __future__ import (absolute_import, division)
__metaclass__ = type
from ansible.compat.tests.mock import Mock, patch
from units.compat.mock import Mock, patch
from .. base import BaseFactsTest

View file

@ -20,8 +20,8 @@ from __future__ import (absolute_import, division)
__metaclass__ = type
# for testing
from ansible.compat.tests import unittest
from ansible.compat.tests.mock import Mock, patch
from units.compat import unittest
from units.compat.mock import Mock, patch
from ansible.module_utils.facts import collector
from ansible.module_utils.facts import ansible_collector

View file

@ -24,7 +24,7 @@ from collections import defaultdict
import pprint
# for testing
from ansible.compat.tests import unittest
from units.compat import unittest
from ansible.module_utils.facts import collector

View file

@ -19,7 +19,7 @@
from __future__ import (absolute_import, division)
__metaclass__ = type
from ansible.compat.tests.mock import Mock, patch
from units.compat.mock import Mock, patch
from . base import BaseFactsTest

View file

@ -25,8 +25,8 @@ import os
import pytest
# for testing
from ansible.compat.tests import unittest
from ansible.compat.tests.mock import Mock, patch
from units.compat import unittest
from units.compat.mock import Mock, patch
from ansible.module_utils import facts
from ansible.module_utils.facts import hardware

View file

@ -24,8 +24,8 @@ import time
import pytest
from ansible.compat.tests import unittest
from ansible.compat.tests.mock import patch, MagicMock
from units.compat import unittest
from units.compat.mock import patch, MagicMock
from ansible.module_utils.facts import timeout

View file

@ -17,8 +17,8 @@
from __future__ import (absolute_import, division)
__metaclass__ = type
from ansible.compat.tests import unittest
from ansible.compat.tests.mock import patch
from units.compat import unittest
from units.compat.mock import patch
from ansible.module_utils.facts import utils

View file

@ -20,7 +20,7 @@ import sys
import pytest
from ansible.compat.tests import mock, unittest
from units.compat import mock, unittest
from ansible.module_utils.gcp import (_get_gcp_ansible_credentials, _get_gcp_credentials, _get_gcp_environ_var,
_get_gcp_environment_credentials,
_validate_credentials_file)

View file

@ -18,7 +18,7 @@
import os
import sys
from ansible.compat.tests import mock, unittest
from units.compat import mock, unittest
from ansible.module_utils.gcp_utils import GcpRequest

View file

@ -18,7 +18,7 @@
import os
import sys
from ansible.compat.tests import mock, unittest
from units.compat import mock, unittest
from ansible.module_utils.gcp import check_min_pkg_version, GCPUtils, GCPInvalidURLError

View file

@ -22,7 +22,7 @@ __metaclass__ = type
import json
from ansible.compat.tests import unittest
from units.compat import unittest
from ansible.module_utils.json_utils import _filter_non_json_lines

View file

@ -7,8 +7,8 @@ __metaclass__ = type
import sys
import copy
from ansible.compat.tests import unittest
from ansible.compat.tests.mock import patch, MagicMock, Mock
from units.compat import unittest
from units.compat.mock import patch, MagicMock, Mock
from ansible.module_utils.net_tools.nios import api

View file

@ -20,7 +20,7 @@
import sys
from ansible.compat.tests import unittest
from units.compat import unittest
from ansible.module_utils.network.aci.aci import ACIModule
from ansible.module_utils.six import PY2, PY3
from ansible.module_utils._text import to_native

View file

@ -20,7 +20,7 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
from ansible.compat.tests import unittest
from units.compat import unittest
from ansible.module_utils.network.common.parsing import Conditional
test_results = ['result_1', 'result_2', 'result_3']

View file

@ -16,8 +16,8 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
from ansible.compat.tests import mock
from ansible.compat.tests.mock import call, patch
from units.compat import mock
from units.compat.mock import call, patch
from ansible.module_utils.network.ftd.configuration import iterate_over_pageable_resource, BaseConfigurationResource

View file

@ -24,7 +24,7 @@ import json
from mock import MagicMock, patch, call
from ansible.compat.tests import unittest
from units.compat import unittest
from ansible.module_utils.network.nos import nos

View file

@ -20,8 +20,8 @@ from __future__ import (absolute_import, division, print_function)
import json
from ansible.compat.tests.mock import patch
from ansible.compat.tests import unittest
from units.compat.mock import patch
from units.compat import unittest
from ansible.module_utils.network.nso import nso

View file

@ -24,7 +24,7 @@ import json
from mock import MagicMock, patch, call
from ansible.compat.tests import unittest
from units.compat import unittest
from ansible.module_utils.network.slxos import slxos

View file

@ -3,8 +3,8 @@
import sys
from ansible.compat.tests import unittest
from ansible.compat.tests.mock import patch, MagicMock
from units.compat import unittest
from units.compat.mock import patch, MagicMock
from ansible.module_utils.six.moves import builtins
from ansible.module_utils._text import to_native

View file

@ -22,7 +22,7 @@ from __future__ import (absolute_import, division, print_function)
import copy
import pytest
from ansible.compat.tests.mock import MagicMock, Mock, patch
from units.compat.mock import MagicMock, Mock, patch
from ansible.module_utils import basic
from units.modules.utils import set_module_args

View file

@ -24,7 +24,7 @@ import copy
import pytest
from ansible.module_utils.aws.core import HAS_BOTO3
from ansible.compat.tests.mock import MagicMock
from units.compat.mock import MagicMock
from units.modules.utils import set_module_args
if not HAS_BOTO3:

View file

@ -6,7 +6,7 @@ import re
import uuid
from urllib3.response import HTTPResponse
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.module_utils import basic
from ansible.module_utils._text import to_bytes
from ansible.modules.monitoring import circonus_annotation

View file

@ -7,7 +7,7 @@
from ansible.modules.monitoring import icinga2_feature
from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.module_utils import basic

View file

@ -1,4 +1,4 @@
from ansible.compat.tests import unittest
from units.compat import unittest
from ansible.modules.monitoring import pagerduty
import json

View file

@ -1,4 +1,4 @@
from ansible.compat.tests import unittest
from units.compat import unittest
from ansible.modules.monitoring import pagerduty_alert
from ansible.module_utils.six.moves.urllib.parse import urlparse, urlencode, urlunparse

View file

@ -22,7 +22,7 @@ __metaclass__ = type
from ansible.modules.net_tools.nios import nios_a_record
from ansible.module_utils.net_tools.nios import api
from ansible.compat.tests.mock import patch, MagicMock, Mock
from units.compat.mock import patch, MagicMock, Mock
from .test_nios_module import TestNiosModule, load_fixture

View file

@ -22,7 +22,7 @@ __metaclass__ = type
from ansible.modules.net_tools.nios import nios_aaaa_record
from ansible.module_utils.net_tools.nios import api
from ansible.compat.tests.mock import patch, MagicMock, Mock
from units.compat.mock import patch, MagicMock, Mock
from .test_nios_module import TestNiosModule, load_fixture

View file

@ -22,7 +22,7 @@ __metaclass__ = type
from ansible.modules.net_tools.nios import nios_cname_record
from ansible.module_utils.net_tools.nios import api
from ansible.compat.tests.mock import patch, MagicMock, Mock
from units.compat.mock import patch, MagicMock, Mock
from .test_nios_module import TestNiosModule, load_fixture

View file

@ -22,7 +22,7 @@ __metaclass__ = type
from ansible.modules.net_tools.nios import nios_dns_view
from ansible.module_utils.net_tools.nios import api
from ansible.compat.tests.mock import patch, MagicMock, Mock
from units.compat.mock import patch, MagicMock, Mock
from .test_nios_module import TestNiosModule, load_fixture

View file

@ -21,7 +21,7 @@ __metaclass__ = type
from ansible.modules.net_tools.nios import nios_host_record
from ansible.module_utils.net_tools.nios import api
from units.modules.utils import set_module_args
from ansible.compat.tests.mock import patch, MagicMock, Mock
from units.compat.mock import patch, MagicMock, Mock
from .test_nios_module import TestNiosModule, load_fixture

View file

@ -22,7 +22,7 @@ __metaclass__ = type
from ansible.modules.net_tools.nios import nios_mx_record
from ansible.module_utils.net_tools.nios import api
from ansible.compat.tests.mock import patch, MagicMock, Mock
from units.compat.mock import patch, MagicMock, Mock
from .test_nios_module import TestNiosModule, load_fixture

View file

@ -22,7 +22,7 @@ __metaclass__ = type
from ansible.modules.net_tools.nios import nios_naptr_record
from ansible.module_utils.net_tools.nios import api
from ansible.compat.tests.mock import patch, MagicMock, Mock
from units.compat.mock import patch, MagicMock, Mock
from .test_nios_module import TestNiosModule, load_fixture

View file

@ -20,7 +20,7 @@ __metaclass__ = type
from ansible.module_utils.net_tools.nios import api
from ansible.modules.net_tools.nios import nios_network
from ansible.compat.tests.mock import patch, MagicMock, Mock
from units.compat.mock import patch, MagicMock, Mock
from units.modules.utils import set_module_args
from .test_nios_module import TestNiosModule, load_fixture

View file

@ -22,7 +22,7 @@ __metaclass__ = type
from ansible.modules.net_tools.nios import nios_network_view
from ansible.module_utils.net_tools.nios import api
from ansible.compat.tests.mock import patch, MagicMock, Mock
from units.compat.mock import patch, MagicMock, Mock
from .test_nios_module import TestNiosModule, load_fixture

View file

@ -20,7 +20,7 @@ __metaclass__ = type
from ansible.modules.net_tools.nios import nios_ptr_record
from ansible.module_utils.net_tools.nios import api
from ansible.compat.tests.mock import patch, MagicMock, Mock
from units.compat.mock import patch, MagicMock, Mock
from .test_nios_module import TestNiosModule, load_fixture

View file

@ -22,7 +22,7 @@ __metaclass__ = type
from ansible.modules.net_tools.nios import nios_srv_record
from ansible.module_utils.net_tools.nios import api
from ansible.compat.tests.mock import patch, MagicMock, Mock
from units.compat.mock import patch, MagicMock, Mock
from .test_nios_module import TestNiosModule, load_fixture

View file

@ -22,7 +22,7 @@ __metaclass__ = type
from ansible.modules.net_tools.nios import nios_zone
from ansible.module_utils.net_tools.nios import api
from ansible.compat.tests.mock import patch, MagicMock, Mock
from units.compat.mock import patch, MagicMock, Mock
from .test_nios_module import TestNiosModule, load_fixture

View file

@ -21,7 +21,7 @@ __metaclass__ = type
import json
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.modules.network.aireos import aireos_command
from units.modules.utils import set_module_args
from .aireos_module import TestCiscoWlcModule, load_fixture

View file

@ -20,7 +20,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.modules.network.aireos import aireos_config
from units.modules.utils import set_module_args
from .aireos_module import TestCiscoWlcModule, load_fixture

View file

@ -21,7 +21,7 @@ __metaclass__ = type
import json
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.modules.network.aruba import aruba_command
from units.modules.utils import set_module_args
from .aruba_module import TestArubaModule, load_fixture

View file

@ -20,7 +20,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.modules.network.aruba import aruba_config
from units.modules.utils import set_module_args
from .aruba_module import TestArubaModule, load_fixture

View file

@ -14,8 +14,8 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
from ansible.compat.tests import unittest
from ansible.compat.tests.mock import patch, Mock
from units.compat import unittest
from units.compat.mock import patch, Mock
import sys
sys.modules['cvprac'] = Mock()
sys.modules['cvprac.cvp_client'] = Mock()

View file

@ -23,8 +23,8 @@ import os
import json
import tempfile
from ansible.compat.tests import unittest
from ansible.compat.tests.mock import patch
from units.compat import unittest
from units.compat.mock import patch
from ansible.module_utils import basic
from ansible.module_utils._text import to_bytes

View file

@ -3,7 +3,7 @@ __metaclass__ = type
import json
import os
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.modules.network.cnos import cnos_bgp
from units.modules.utils import set_module_args
from .cnos_module import TestCnosModule, load_fixture

View file

@ -21,7 +21,7 @@ __metaclass__ = type
import json
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.modules.network.cnos import cnos_command
from units.modules.utils import set_module_args
from .cnos_module import TestCnosModule, load_fixture

View file

@ -22,7 +22,7 @@ __metaclass__ = type
import json
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.modules.network.cnos import cnos_config
from .cnos_module import TestCnosModule, load_fixture

View file

@ -3,7 +3,7 @@ __metaclass__ = type
import json
import os
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.modules.network.cnos import cnos_interface
from units.modules.utils import set_module_args
from .cnos_module import TestCnosModule, load_fixture

View file

@ -21,7 +21,7 @@ __metaclass__ = type
import json
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from .cnos_module import TestCnosModule, load_fixture
from ansible.modules.network.cnos import cnos_facts
from units.modules.utils import set_module_args

View file

@ -3,7 +3,7 @@ __metaclass__ = type
import json
import os
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.modules.network.cnos import cnos_portchannel
from units.modules.utils import set_module_args
from .cnos_module import TestCnosModule, load_fixture

View file

@ -3,7 +3,7 @@ __metaclass__ = type
import json
import os
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.modules.network.cnos import cnos_vlag
from units.modules.utils import set_module_args
from .cnos_module import TestCnosModule, load_fixture

View file

@ -3,7 +3,7 @@ __metaclass__ = type
import json
import os
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.modules.network.cnos import cnos_vlan
from units.modules.utils import set_module_args
from .cnos_module import TestCnosModule, load_fixture

View file

@ -23,7 +23,7 @@ __metaclass__ = type
import json
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.modules.network.dellos10 import dellos10_command
from units.modules.utils import set_module_args
from .dellos10_module import TestDellos10Module, load_fixture

View file

@ -22,7 +22,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.modules.network.dellos10 import dellos10_config
from units.modules.utils import set_module_args
from .dellos10_module import TestDellos10Module, load_fixture

View file

@ -23,7 +23,7 @@ __metaclass__ = type
import json
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from .dellos10_module import TestDellos10Module, load_fixture
from ansible.modules.network.dellos10 import dellos10_facts

View file

@ -21,7 +21,7 @@ __metaclass__ = type
import json
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.modules.network.dellos6 import dellos6_command
from units.modules.utils import set_module_args
from .dellos6_module import TestDellos6Module, load_fixture

View file

@ -20,7 +20,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.modules.network.dellos6 import dellos6_config
from units.modules.utils import set_module_args
from .dellos6_module import TestDellos6Module, load_fixture

View file

@ -21,7 +21,7 @@ __metaclass__ = type
import json
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from .dellos6_module import TestDellos6Module, load_fixture
from ansible.modules.network.dellos6 import dellos6_facts

View file

@ -23,7 +23,7 @@ __metaclass__ = type
import json
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.modules.network.dellos9 import dellos9_command
from units.modules.utils import set_module_args
from .dellos9_module import TestDellos9Module, load_fixture

View file

@ -22,7 +22,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.modules.network.dellos9 import dellos9_config
from units.modules.utils import set_module_args
from .dellos9_module import TestDellos9Module, load_fixture

View file

@ -21,7 +21,7 @@ __metaclass__ = type
import json
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from units.modules.utils import set_module_args
from .dellos9_module import TestDellos9Module, load_fixture
from ansible.modules.network.dellos9 import dellos9_facts

View file

@ -21,7 +21,7 @@ __metaclass__ = type
import json
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.modules.network.edgeos import edgeos_command
from units.modules.utils import set_module_args
from .edgeos_module import TestEdgeosModule, load_fixture

View file

@ -20,7 +20,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.compat.tests.mock import patch
from units.compat.mock import patch
from ansible.modules.network.edgeos import edgeos_config
from units.modules.utils import set_module_args
from .edgeos_module import TestEdgeosModule, load_fixture

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