diff --git a/test/runner/lib/classification.py b/test/runner/lib/classification.py index 77fc06f673..1ccb877ad9 100644 --- a/test/runner/lib/classification.py +++ b/test/runner/lib/classification.py @@ -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) diff --git a/test/units/cli/test_cli.py b/test/units/cli/test_cli.py index dc94c204d2..dffb4e692f 100644 --- a/test/units/cli/test_cli.py +++ b/test/units/cli/test_cli.py @@ -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 diff --git a/test/units/cli/test_console.py b/test/units/cli/test_console.py index 4be983608a..c22dd55ba4 100644 --- a/test/units/cli/test_console.py +++ b/test/units/cli/test_console.py @@ -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 diff --git a/test/units/cli/test_galaxy.py b/test/units/cli/test_galaxy.py index eb5075f1be..7791736e28 100644 --- a/test/units/cli/test_galaxy.py +++ b/test/units/cli/test_galaxy.py @@ -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 diff --git a/test/units/cli/test_playbook.py b/test/units/cli/test_playbook.py index a44084b4a7..0090f696dd 100644 --- a/test/units/cli/test_playbook.py +++ b/test/units/cli/test_playbook.py @@ -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 diff --git a/test/units/cli/test_vault.py b/test/units/cli/test_vault.py index d12a14fad9..9aba0ecd99 100644 --- a/test/units/cli/test_vault.py +++ b/test/units/cli/test_vault.py @@ -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 diff --git a/test/units/compat/__init__.py b/test/units/compat/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/lib/ansible/compat/tests/__init__.py b/test/units/compat/builtins.py similarity index 84% rename from lib/ansible/compat/tests/__init__.py rename to test/units/compat/builtins.py index fe8fef59bb..f60ee67822 100644 --- a/lib/ansible/compat/tests/__init__.py +++ b/test/units/compat/builtins.py @@ -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 # diff --git a/lib/ansible/compat/tests/mock.py b/test/units/compat/mock.py similarity index 100% rename from lib/ansible/compat/tests/mock.py rename to test/units/compat/mock.py diff --git a/lib/ansible/compat/tests/unittest.py b/test/units/compat/unittest.py similarity index 100% rename from lib/ansible/compat/tests/unittest.py rename to test/units/compat/unittest.py diff --git a/test/units/config/test_data.py b/test/units/config/test_data.py index 9ee7d9ed38..da043e7b92 100644 --- a/test/units/config/test_data.py +++ b/test/units/config/test_data.py @@ -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 diff --git a/test/units/config/test_manager.py b/test/units/config/test_manager.py index 316d6a433a..f3a4a90404 100644 --- a/test/units/config/test_manager.py +++ b/test/units/config/test_manager.py @@ -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 diff --git a/test/units/errors/test_errors.py b/test/units/errors/test_errors.py index bf5d461e83..d5b6bbfc98 100644 --- a/test/units/errors/test_errors.py +++ b/test/units/errors/test_errors.py @@ -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 diff --git a/test/units/executor/test_play_iterator.py b/test/units/executor/test_play_iterator.py index 525944185d..496d78b82f 100644 --- a/test/units/executor/test_play_iterator.py +++ b/test/units/executor/test_play_iterator.py @@ -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 diff --git a/test/units/executor/test_playbook_executor.py b/test/units/executor/test_playbook_executor.py index 4733b2008b..a7c669c3df 100644 --- a/test/units/executor/test_playbook_executor.py +++ b/test/units/executor/test_playbook_executor.py @@ -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 diff --git a/test/units/executor/test_task_executor.py b/test/units/executor/test_task_executor.py index 7870d1f847..fab9845f5d 100644 --- a/test/units/executor/test_task_executor.py +++ b/test/units/executor/test_task_executor.py @@ -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 diff --git a/test/units/executor/test_task_queue_manager_callbacks.py b/test/units/executor/test_task_queue_manager_callbacks.py index b42f4d76b7..28d372949b 100644 --- a/test/units/executor/test_task_queue_manager_callbacks.py +++ b/test/units/executor/test_task_queue_manager_callbacks.py @@ -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 diff --git a/test/units/executor/test_task_result.py b/test/units/executor/test_task_result.py index 35df122464..3ce210de8d 100644 --- a/test/units/executor/test_task_result.py +++ b/test/units/executor/test_task_result.py @@ -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 diff --git a/test/units/mock/path.py b/test/units/mock/path.py index f3bd996edb..14a35d63ba 100644 --- a/test/units/mock/path.py +++ b/test/units/mock/path.py @@ -1,4 +1,4 @@ -from ansible.compat.tests.mock import MagicMock +from units.compat.mock import MagicMock from ansible.utils.path import unfrackpath diff --git a/test/units/mock/procenv.py b/test/units/mock/procenv.py index e7326c0935..271a207e2e 100644 --- a/test/units/mock/procenv.py +++ b/test/units/mock/procenv.py @@ -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 diff --git a/test/units/module_utils/aws/test_aws_module.py b/test/units/module_utils/aws/test_aws_module.py index 9539a2dc93..425282cc54 100644 --- a/test/units/module_utils/aws/test_aws_module.py +++ b/test/units/module_utils/aws/test_aws_module.py @@ -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") diff --git a/test/units/module_utils/basic/test_argument_spec.py b/test/units/module_utils/basic/test_argument_spec.py index 18ccd845e9..fd16dc6f6f 100644 --- a/test/units/module_utils/basic/test_argument_spec.py +++ b/test/units/module_utils/basic/test_argument_spec.py @@ -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 diff --git a/test/units/module_utils/basic/test_filesystem.py b/test/units/module_utils/basic/test_filesystem.py index abe52c14ea..37d1c5537a 100644 --- a/test/units/module_utils/basic/test_filesystem.py +++ b/test/units/module_utils/basic/test_filesystem.py @@ -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__ diff --git a/test/units/module_utils/basic/test_get_module_path.py b/test/units/module_utils/basic/test_get_module_path.py index 641aed9a3c..6ff4a3bc71 100644 --- a/test/units/module_utils/basic/test_get_module_path.py +++ b/test/units/module_utils/basic/test_get_module_path.py @@ -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__ diff --git a/test/units/module_utils/basic/test_heuristic_log_sanitize.py b/test/units/module_utils/basic/test_heuristic_log_sanitize.py index 19345bd4b2..799facc6b8 100644 --- a/test/units/module_utils/basic/test_heuristic_log_sanitize.py +++ b/test/units/module_utils/basic/test_heuristic_log_sanitize.py @@ -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 diff --git a/test/units/module_utils/basic/test_imports.py b/test/units/module_utils/basic/test_imports.py index 0a0f8333f6..25dfb01e64 100644 --- a/test/units/module_utils/basic/test_imports.py +++ b/test/units/module_utils/basic/test_imports.py @@ -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__ diff --git a/test/units/module_utils/basic/test_no_log.py b/test/units/module_utils/basic/test_no_log.py index ebd66a3756..1de31c67df 100644 --- a/test/units/module_utils/basic/test_no_log.py +++ b/test/units/module_utils/basic/test_no_log.py @@ -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 diff --git a/test/units/module_utils/basic/test_platform_distribution.py b/test/units/module_utils/basic/test_platform_distribution.py index a1a00b2bb9..ce202ba6ce 100644 --- a/test/units/module_utils/basic/test_platform_distribution.py +++ b/test/units/module_utils/basic/test_platform_distribution.py @@ -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__ diff --git a/test/units/module_utils/basic/test_selinux.py b/test/units/module_utils/basic/test_selinux.py index df6ec9d0e8..8562eb881a 100644 --- a/test/units/module_utils/basic/test_selinux.py +++ b/test/units/module_utils/basic/test_selinux.py @@ -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__ diff --git a/test/units/module_utils/basic/test_tmpdir.py b/test/units/module_utils/basic/test_tmpdir.py index 20b529893a..40cd0d161f 100644 --- a/test/units/module_utils/basic/test_tmpdir.py +++ b/test/units/module_utils/basic/test_tmpdir.py @@ -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 diff --git a/test/units/module_utils/cloud/test_backoff.py b/test/units/module_utils/cloud/test_backoff.py index 7a128f980e..7a6a3a3c98 100644 --- a/test/units/module_utils/cloud/test_backoff.py +++ b/test/units/module_utils/cloud/test_backoff.py @@ -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 diff --git a/test/units/module_utils/common/test_dict_transformations.py b/test/units/module_utils/common/test_dict_transformations.py index 6756a2b54f..6412cc17ff 100644 --- a/test/units/module_utils/common/test_dict_transformations.py +++ b/test/units/module_utils/common/test_dict_transformations.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . -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 = { diff --git a/test/units/module_utils/ec2/test_aws.py b/test/units/module_utils/ec2/test_aws.py index 5610d424c4..fdc1b36676 100644 --- a/test/units/module_utils/ec2/test_aws.py +++ b/test/units/module_utils/ec2/test_aws.py @@ -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: diff --git a/test/units/module_utils/facts/base.py b/test/units/module_utils/facts/base.py index 8b32c5352b..04e00d12d8 100644 --- a/test/units/module_utils/facts/base.py +++ b/test/units/module_utils/facts/base.py @@ -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): diff --git a/test/units/module_utils/facts/hardware/test_linux.py b/test/units/module_utils/facts/hardware/test_linux.py index f581c8068b..20e65b5fcc 100644 --- a/test/units/module_utils/facts/hardware/test_linux.py +++ b/test/units/module_utils/facts/hardware/test_linux.py @@ -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 diff --git a/test/units/module_utils/facts/network/test_generic_bsd.py b/test/units/module_utils/facts/network/test_generic_bsd.py index 45b4d75944..d62a8a4d50 100644 --- a/test/units/module_utils/facts/network/test_generic_bsd.py +++ b/test/units/module_utils/facts/network/test_generic_bsd.py @@ -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 diff --git a/test/units/module_utils/facts/other/test_facter.py b/test/units/module_utils/facts/other/test_facter.py index eac6abf712..b18fa1135f 100644 --- a/test/units/module_utils/facts/other/test_facter.py +++ b/test/units/module_utils/facts/other/test_facter.py @@ -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 diff --git a/test/units/module_utils/facts/other/test_ohai.py b/test/units/module_utils/facts/other/test_ohai.py index f556765600..2c15cc5b3b 100644 --- a/test/units/module_utils/facts/other/test_ohai.py +++ b/test/units/module_utils/facts/other/test_ohai.py @@ -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 diff --git a/test/units/module_utils/facts/system/test_lsb.py b/test/units/module_utils/facts/system/test_lsb.py index 6bc5347037..dd5188b2fd 100644 --- a/test/units/module_utils/facts/system/test_lsb.py +++ b/test/units/module_utils/facts/system/test_lsb.py @@ -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 diff --git a/test/units/module_utils/facts/test_ansible_collector.py b/test/units/module_utils/facts/test_ansible_collector.py index 5117209095..781a896810 100644 --- a/test/units/module_utils/facts/test_ansible_collector.py +++ b/test/units/module_utils/facts/test_ansible_collector.py @@ -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 diff --git a/test/units/module_utils/facts/test_collector.py b/test/units/module_utils/facts/test_collector.py index 76f37f3ceb..a8cf0bc691 100644 --- a/test/units/module_utils/facts/test_collector.py +++ b/test/units/module_utils/facts/test_collector.py @@ -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 diff --git a/test/units/module_utils/facts/test_collectors.py b/test/units/module_utils/facts/test_collectors.py index 668344d368..58f62d3926 100644 --- a/test/units/module_utils/facts/test_collectors.py +++ b/test/units/module_utils/facts/test_collectors.py @@ -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 diff --git a/test/units/module_utils/facts/test_facts.py b/test/units/module_utils/facts/test_facts.py index d83058bb92..a037ee0ce3 100644 --- a/test/units/module_utils/facts/test_facts.py +++ b/test/units/module_utils/facts/test_facts.py @@ -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 diff --git a/test/units/module_utils/facts/test_timeout.py b/test/units/module_utils/facts/test_timeout.py index bd18655f29..36adbfabd1 100644 --- a/test/units/module_utils/facts/test_timeout.py +++ b/test/units/module_utils/facts/test_timeout.py @@ -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 diff --git a/test/units/module_utils/facts/test_utils.py b/test/units/module_utils/facts/test_utils.py index b35f68d2fc..25a9aac7f4 100644 --- a/test/units/module_utils/facts/test_utils.py +++ b/test/units/module_utils/facts/test_utils.py @@ -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 diff --git a/test/units/module_utils/gcp/test_auth.py b/test/units/module_utils/gcp/test_auth.py index aad732741d..b158d81ca3 100644 --- a/test/units/module_utils/gcp/test_auth.py +++ b/test/units/module_utils/gcp/test_auth.py @@ -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) diff --git a/test/units/module_utils/gcp/test_gcp_utils.py b/test/units/module_utils/gcp/test_gcp_utils.py index c6c6958f85..7554100320 100644 --- a/test/units/module_utils/gcp/test_gcp_utils.py +++ b/test/units/module_utils/gcp/test_gcp_utils.py @@ -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 diff --git a/test/units/module_utils/gcp/test_utils.py b/test/units/module_utils/gcp/test_utils.py index e2b0feb612..46cb39d02f 100644 --- a/test/units/module_utils/gcp/test_utils.py +++ b/test/units/module_utils/gcp/test_utils.py @@ -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 diff --git a/test/units/module_utils/json_utils/test_filter_non_json_lines.py b/test/units/module_utils/json_utils/test_filter_non_json_lines.py index 0166213f43..9d6e3657e7 100644 --- a/test/units/module_utils/json_utils/test_filter_non_json_lines.py +++ b/test/units/module_utils/json_utils/test_filter_non_json_lines.py @@ -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 diff --git a/test/units/module_utils/net_tools/nios/test_api.py b/test/units/module_utils/net_tools/nios/test_api.py index a04a1f1aa6..dbac44a079 100644 --- a/test/units/module_utils/net_tools/nios/test_api.py +++ b/test/units/module_utils/net_tools/nios/test_api.py @@ -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 diff --git a/test/units/module_utils/network/aci/test_aci.py b/test/units/module_utils/network/aci/test_aci.py index f930d75dc0..f4379ff896 100644 --- a/test/units/module_utils/network/aci/test_aci.py +++ b/test/units/module_utils/network/aci/test_aci.py @@ -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 diff --git a/test/units/module_utils/network/common/test_parsing.py b/test/units/module_utils/network/common/test_parsing.py index 7dcbea51f7..34dd0db30b 100644 --- a/test/units/module_utils/network/common/test_parsing.py +++ b/test/units/module_utils/network/common/test_parsing.py @@ -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'] diff --git a/test/units/module_utils/network/ftd/test_configuration.py b/test/units/module_utils/network/ftd/test_configuration.py index ff6f475e23..9a58afd09e 100644 --- a/test/units/module_utils/network/ftd/test_configuration.py +++ b/test/units/module_utils/network/ftd/test_configuration.py @@ -16,8 +16,8 @@ # along with Ansible. If not, see . # -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 diff --git a/test/units/module_utils/network/nos/test_nos.py b/test/units/module_utils/network/nos/test_nos.py index 8210a47728..f1bff7684f 100644 --- a/test/units/module_utils/network/nos/test_nos.py +++ b/test/units/module_utils/network/nos/test_nos.py @@ -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 diff --git a/test/units/module_utils/network/nso/test_nso.py b/test/units/module_utils/network/nso/test_nso.py index 8df776b3c9..567af586a5 100644 --- a/test/units/module_utils/network/nso/test_nso.py +++ b/test/units/module_utils/network/nso/test_nso.py @@ -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 diff --git a/test/units/module_utils/network/slxos/test_slxos.py b/test/units/module_utils/network/slxos/test_slxos.py index b2d856e7b4..ab00a415b5 100644 --- a/test/units/module_utils/network/slxos/test_slxos.py +++ b/test/units/module_utils/network/slxos/test_slxos.py @@ -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 diff --git a/test/units/module_utils/test_postgresql.py b/test/units/module_utils/test_postgresql.py index 7823cf92ab..cf82cbc901 100644 --- a/test/units/module_utils/test_postgresql.py +++ b/test/units/module_utils/test_postgresql.py @@ -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 diff --git a/test/units/modules/cloud/amazon/test_lambda.py b/test/units/modules/cloud/amazon/test_lambda.py index c890c977a3..844b442ade 100644 --- a/test/units/modules/cloud/amazon/test_lambda.py +++ b/test/units/modules/cloud/amazon/test_lambda.py @@ -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 diff --git a/test/units/modules/cloud/amazon/test_lambda_policy.py b/test/units/modules/cloud/amazon/test_lambda_policy.py index 0bae3bc812..0b4a7001ba 100644 --- a/test/units/modules/cloud/amazon/test_lambda_policy.py +++ b/test/units/modules/cloud/amazon/test_lambda_policy.py @@ -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: diff --git a/test/units/modules/monitoring/test_circonus_annotation.py b/test/units/modules/monitoring/test_circonus_annotation.py index 5073b2ae1b..d53fe0bf5b 100644 --- a/test/units/modules/monitoring/test_circonus_annotation.py +++ b/test/units/modules/monitoring/test_circonus_annotation.py @@ -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 diff --git a/test/units/modules/monitoring/test_icinga2_feature.py b/test/units/modules/monitoring/test_icinga2_feature.py index f0ff42025d..2e221faabe 100644 --- a/test/units/modules/monitoring/test_icinga2_feature.py +++ b/test/units/modules/monitoring/test_icinga2_feature.py @@ -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 diff --git a/test/units/modules/monitoring/test_pagerduty.py b/test/units/modules/monitoring/test_pagerduty.py index ceeaac6d98..00f4d4dc38 100644 --- a/test/units/modules/monitoring/test_pagerduty.py +++ b/test/units/modules/monitoring/test_pagerduty.py @@ -1,4 +1,4 @@ -from ansible.compat.tests import unittest +from units.compat import unittest from ansible.modules.monitoring import pagerduty import json diff --git a/test/units/modules/monitoring/test_pagerduty_alert.py b/test/units/modules/monitoring/test_pagerduty_alert.py index d992462f61..4a92cb396a 100644 --- a/test/units/modules/monitoring/test_pagerduty_alert.py +++ b/test/units/modules/monitoring/test_pagerduty_alert.py @@ -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 diff --git a/test/units/modules/net_tools/nios/test_nios_a_record.py b/test/units/modules/net_tools/nios/test_nios_a_record.py index 66a303ec23..c1a8091629 100644 --- a/test/units/modules/net_tools/nios/test_nios_a_record.py +++ b/test/units/modules/net_tools/nios/test_nios_a_record.py @@ -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 diff --git a/test/units/modules/net_tools/nios/test_nios_aaaa_record.py b/test/units/modules/net_tools/nios/test_nios_aaaa_record.py index bfc836c541..8c9751e059 100644 --- a/test/units/modules/net_tools/nios/test_nios_aaaa_record.py +++ b/test/units/modules/net_tools/nios/test_nios_aaaa_record.py @@ -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 diff --git a/test/units/modules/net_tools/nios/test_nios_cname_record.py b/test/units/modules/net_tools/nios/test_nios_cname_record.py index 4b5a1e1a45..ecf8dfcba0 100644 --- a/test/units/modules/net_tools/nios/test_nios_cname_record.py +++ b/test/units/modules/net_tools/nios/test_nios_cname_record.py @@ -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 diff --git a/test/units/modules/net_tools/nios/test_nios_dns_view.py b/test/units/modules/net_tools/nios/test_nios_dns_view.py index 37ff2188cb..d5e7656cb2 100644 --- a/test/units/modules/net_tools/nios/test_nios_dns_view.py +++ b/test/units/modules/net_tools/nios/test_nios_dns_view.py @@ -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 diff --git a/test/units/modules/net_tools/nios/test_nios_host_record.py b/test/units/modules/net_tools/nios/test_nios_host_record.py index ded685f1fd..994e54b486 100644 --- a/test/units/modules/net_tools/nios/test_nios_host_record.py +++ b/test/units/modules/net_tools/nios/test_nios_host_record.py @@ -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 diff --git a/test/units/modules/net_tools/nios/test_nios_mx_record.py b/test/units/modules/net_tools/nios/test_nios_mx_record.py index b05e6a540b..21ac7b2b9f 100644 --- a/test/units/modules/net_tools/nios/test_nios_mx_record.py +++ b/test/units/modules/net_tools/nios/test_nios_mx_record.py @@ -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 diff --git a/test/units/modules/net_tools/nios/test_nios_naptr_record.py b/test/units/modules/net_tools/nios/test_nios_naptr_record.py index b6535cc8d9..2f1547c29f 100644 --- a/test/units/modules/net_tools/nios/test_nios_naptr_record.py +++ b/test/units/modules/net_tools/nios/test_nios_naptr_record.py @@ -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 diff --git a/test/units/modules/net_tools/nios/test_nios_network.py b/test/units/modules/net_tools/nios/test_nios_network.py index a68903f3b1..b2ab15f13d 100644 --- a/test/units/modules/net_tools/nios/test_nios_network.py +++ b/test/units/modules/net_tools/nios/test_nios_network.py @@ -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 diff --git a/test/units/modules/net_tools/nios/test_nios_network_view.py b/test/units/modules/net_tools/nios/test_nios_network_view.py index 5a98893bb1..4a4be1244b 100644 --- a/test/units/modules/net_tools/nios/test_nios_network_view.py +++ b/test/units/modules/net_tools/nios/test_nios_network_view.py @@ -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 diff --git a/test/units/modules/net_tools/nios/test_nios_ptr_record.py b/test/units/modules/net_tools/nios/test_nios_ptr_record.py index 3a5d0ab6eb..66665eed3a 100644 --- a/test/units/modules/net_tools/nios/test_nios_ptr_record.py +++ b/test/units/modules/net_tools/nios/test_nios_ptr_record.py @@ -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 diff --git a/test/units/modules/net_tools/nios/test_nios_srv_record.py b/test/units/modules/net_tools/nios/test_nios_srv_record.py index bdb3bbd997..2c0b27388c 100644 --- a/test/units/modules/net_tools/nios/test_nios_srv_record.py +++ b/test/units/modules/net_tools/nios/test_nios_srv_record.py @@ -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 diff --git a/test/units/modules/net_tools/nios/test_nios_zone.py b/test/units/modules/net_tools/nios/test_nios_zone.py index 3054ddbf02..39cd09dbda 100644 --- a/test/units/modules/net_tools/nios/test_nios_zone.py +++ b/test/units/modules/net_tools/nios/test_nios_zone.py @@ -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 diff --git a/test/units/modules/network/aireos/test_aireos_command.py b/test/units/modules/network/aireos/test_aireos_command.py index 14d7f58e5a..b7fc8f4283 100644 --- a/test/units/modules/network/aireos/test_aireos_command.py +++ b/test/units/modules/network/aireos/test_aireos_command.py @@ -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 diff --git a/test/units/modules/network/aireos/test_aireos_config.py b/test/units/modules/network/aireos/test_aireos_config.py index 002e839b72..bfc9c0760d 100644 --- a/test/units/modules/network/aireos/test_aireos_config.py +++ b/test/units/modules/network/aireos/test_aireos_config.py @@ -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 diff --git a/test/units/modules/network/aruba/test_aruba_command.py b/test/units/modules/network/aruba/test_aruba_command.py index 3d31aa426a..75129a9f4f 100644 --- a/test/units/modules/network/aruba/test_aruba_command.py +++ b/test/units/modules/network/aruba/test_aruba_command.py @@ -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 diff --git a/test/units/modules/network/aruba/test_aruba_config.py b/test/units/modules/network/aruba/test_aruba_config.py index 4ae72bbde1..5c8dc222ab 100644 --- a/test/units/modules/network/aruba/test_aruba_config.py +++ b/test/units/modules/network/aruba/test_aruba_config.py @@ -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 diff --git a/test/units/modules/network/cloudvision/test_cv_server_provision.py b/test/units/modules/network/cloudvision/test_cv_server_provision.py index 5521a49bea..4c56fa6cb3 100644 --- a/test/units/modules/network/cloudvision/test_cv_server_provision.py +++ b/test/units/modules/network/cloudvision/test_cv_server_provision.py @@ -14,8 +14,8 @@ # along with Ansible. If not, see . # -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() diff --git a/test/units/modules/network/cnos/cnos_module.py b/test/units/modules/network/cnos/cnos_module.py index 4cf00a5de2..bc1428fff0 100644 --- a/test/units/modules/network/cnos/cnos_module.py +++ b/test/units/modules/network/cnos/cnos_module.py @@ -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 diff --git a/test/units/modules/network/cnos/test_cnos_bgp.py b/test/units/modules/network/cnos/test_cnos_bgp.py index 63c4107a99..7d94a05d7f 100644 --- a/test/units/modules/network/cnos/test_cnos_bgp.py +++ b/test/units/modules/network/cnos/test_cnos_bgp.py @@ -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 diff --git a/test/units/modules/network/cnos/test_cnos_command.py b/test/units/modules/network/cnos/test_cnos_command.py index 144eab9c8f..42f3ef32d1 100644 --- a/test/units/modules/network/cnos/test_cnos_command.py +++ b/test/units/modules/network/cnos/test_cnos_command.py @@ -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 diff --git a/test/units/modules/network/cnos/test_cnos_config.py b/test/units/modules/network/cnos/test_cnos_config.py index 35c9199c88..4ba1f382ed 100644 --- a/test/units/modules/network/cnos/test_cnos_config.py +++ b/test/units/modules/network/cnos/test_cnos_config.py @@ -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 diff --git a/test/units/modules/network/cnos/test_cnos_ethernet.py b/test/units/modules/network/cnos/test_cnos_ethernet.py index 62529498dd..0eafd2e702 100644 --- a/test/units/modules/network/cnos/test_cnos_ethernet.py +++ b/test/units/modules/network/cnos/test_cnos_ethernet.py @@ -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 diff --git a/test/units/modules/network/cnos/test_cnos_facts.py b/test/units/modules/network/cnos/test_cnos_facts.py index 90960e1e96..d201a9095d 100644 --- a/test/units/modules/network/cnos/test_cnos_facts.py +++ b/test/units/modules/network/cnos/test_cnos_facts.py @@ -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 diff --git a/test/units/modules/network/cnos/test_cnos_portchannel.py b/test/units/modules/network/cnos/test_cnos_portchannel.py index b6c75eb053..eb506b358b 100644 --- a/test/units/modules/network/cnos/test_cnos_portchannel.py +++ b/test/units/modules/network/cnos/test_cnos_portchannel.py @@ -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 diff --git a/test/units/modules/network/cnos/test_cnos_vlag.py b/test/units/modules/network/cnos/test_cnos_vlag.py index 1013a120e6..ed8b7751b7 100644 --- a/test/units/modules/network/cnos/test_cnos_vlag.py +++ b/test/units/modules/network/cnos/test_cnos_vlag.py @@ -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 diff --git a/test/units/modules/network/cnos/test_cnos_vlan.py b/test/units/modules/network/cnos/test_cnos_vlan.py index 54c461cf18..bd23fecdf3 100644 --- a/test/units/modules/network/cnos/test_cnos_vlan.py +++ b/test/units/modules/network/cnos/test_cnos_vlan.py @@ -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 diff --git a/test/units/modules/network/dellos10/test_dellos10_command.py b/test/units/modules/network/dellos10/test_dellos10_command.py index 47f50033cd..0af2220251 100644 --- a/test/units/modules/network/dellos10/test_dellos10_command.py +++ b/test/units/modules/network/dellos10/test_dellos10_command.py @@ -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 diff --git a/test/units/modules/network/dellos10/test_dellos10_config.py b/test/units/modules/network/dellos10/test_dellos10_config.py index e12adcd8cd..3d23800164 100644 --- a/test/units/modules/network/dellos10/test_dellos10_config.py +++ b/test/units/modules/network/dellos10/test_dellos10_config.py @@ -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 diff --git a/test/units/modules/network/dellos10/test_dellos10_facts.py b/test/units/modules/network/dellos10/test_dellos10_facts.py index 3b1dd9599a..48559ca84d 100644 --- a/test/units/modules/network/dellos10/test_dellos10_facts.py +++ b/test/units/modules/network/dellos10/test_dellos10_facts.py @@ -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 diff --git a/test/units/modules/network/dellos6/test_dellos6_command.py b/test/units/modules/network/dellos6/test_dellos6_command.py index df6c3729b4..3b38dad1f8 100644 --- a/test/units/modules/network/dellos6/test_dellos6_command.py +++ b/test/units/modules/network/dellos6/test_dellos6_command.py @@ -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 diff --git a/test/units/modules/network/dellos6/test_dellos6_config.py b/test/units/modules/network/dellos6/test_dellos6_config.py index 69c1ec79f6..7cd939486f 100644 --- a/test/units/modules/network/dellos6/test_dellos6_config.py +++ b/test/units/modules/network/dellos6/test_dellos6_config.py @@ -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 diff --git a/test/units/modules/network/dellos6/test_dellos6_facts.py b/test/units/modules/network/dellos6/test_dellos6_facts.py index 8339a64723..60e68a1768 100644 --- a/test/units/modules/network/dellos6/test_dellos6_facts.py +++ b/test/units/modules/network/dellos6/test_dellos6_facts.py @@ -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 diff --git a/test/units/modules/network/dellos9/test_dellos9_command.py b/test/units/modules/network/dellos9/test_dellos9_command.py index a216c22b8e..06b11eb6ff 100644 --- a/test/units/modules/network/dellos9/test_dellos9_command.py +++ b/test/units/modules/network/dellos9/test_dellos9_command.py @@ -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 diff --git a/test/units/modules/network/dellos9/test_dellos9_config.py b/test/units/modules/network/dellos9/test_dellos9_config.py index 8b73cf4e18..393d539041 100644 --- a/test/units/modules/network/dellos9/test_dellos9_config.py +++ b/test/units/modules/network/dellos9/test_dellos9_config.py @@ -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 diff --git a/test/units/modules/network/dellos9/test_dellos9_facts.py b/test/units/modules/network/dellos9/test_dellos9_facts.py index 085c4385e8..1fd5af3fda 100644 --- a/test/units/modules/network/dellos9/test_dellos9_facts.py +++ b/test/units/modules/network/dellos9/test_dellos9_facts.py @@ -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 diff --git a/test/units/modules/network/edgeos/test_edgeos_command.py b/test/units/modules/network/edgeos/test_edgeos_command.py index 7de14c76c8..2dc4e61c7a 100644 --- a/test/units/modules/network/edgeos/test_edgeos_command.py +++ b/test/units/modules/network/edgeos/test_edgeos_command.py @@ -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 diff --git a/test/units/modules/network/edgeos/test_edgeos_config.py b/test/units/modules/network/edgeos/test_edgeos_config.py index aec3f47dd7..c927aa4e7d 100644 --- a/test/units/modules/network/edgeos/test_edgeos_config.py +++ b/test/units/modules/network/edgeos/test_edgeos_config.py @@ -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 diff --git a/test/units/modules/network/edgeos/test_edgeos_facts.py b/test/units/modules/network/edgeos/test_edgeos_facts.py index e6a2a1f4da..8bc0edb33e 100644 --- a/test/units/modules/network/edgeos/test_edgeos_facts.py +++ b/test/units/modules/network/edgeos/test_edgeos_facts.py @@ -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_facts from units.modules.utils import set_module_args from .edgeos_module import TestEdgeosModule, load_fixture diff --git a/test/units/modules/network/enos/enos_module.py b/test/units/modules/network/enos/enos_module.py index 66c59ca97f..c97cd5cc35 100644 --- a/test/units/modules/network/enos/enos_module.py +++ b/test/units/modules/network/enos/enos_module.py @@ -22,8 +22,8 @@ __metaclass__ = type import os import json -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 diff --git a/test/units/modules/network/enos/test_enos_command.py b/test/units/modules/network/enos/test_enos_command.py index 8d9fc2c35e..6e571e72bc 100644 --- a/test/units/modules/network/enos/test_enos_command.py +++ b/test/units/modules/network/enos/test_enos_command.py @@ -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.enos import enos_command from units.modules.utils import set_module_args from .enos_module import TestEnosModule, load_fixture diff --git a/test/units/modules/network/enos/test_enos_config.py b/test/units/modules/network/enos/test_enos_config.py index 1b5e4930d3..f7ac61388f 100644 --- a/test/units/modules/network/enos/test_enos_config.py +++ b/test/units/modules/network/enos/test_enos_config.py @@ -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.enos import enos_config from .enos_module import TestEnosModule, load_fixture diff --git a/test/units/modules/network/enos/test_enos_facts.py b/test/units/modules/network/enos/test_enos_facts.py index b0c4ea03c4..75b3ac4527 100644 --- a/test/units/modules/network/enos/test_enos_facts.py +++ b/test/units/modules/network/enos/test_enos_facts.py @@ -21,7 +21,7 @@ __metaclass__ = type import json -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from .enos_module import TestEnosModule, load_fixture from ansible.modules.network.enos import enos_facts from units.modules.utils import set_module_args diff --git a/test/units/modules/network/eos/test_eos_banner.py b/test/units/modules/network/eos/test_eos_banner.py index 7684dc22c9..db062d41f9 100644 --- a/test/units/modules/network/eos/test_eos_banner.py +++ b/test/units/modules/network/eos/test_eos_banner.py @@ -17,7 +17,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.eos import eos_banner from units.modules.utils import set_module_args from .eos_module import TestEosModule, load_fixture diff --git a/test/units/modules/network/eos/test_eos_command.py b/test/units/modules/network/eos/test_eos_command.py index 0734147f43..da4ce25838 100644 --- a/test/units/modules/network/eos/test_eos_command.py +++ b/test/units/modules/network/eos/test_eos_command.py @@ -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.eos import eos_command from units.modules.utils import set_module_args from .eos_module import TestEosModule, load_fixture diff --git a/test/units/modules/network/eos/test_eos_config.py b/test/units/modules/network/eos/test_eos_config.py index f280e94c23..b2bfba0175 100644 --- a/test/units/modules/network/eos/test_eos_config.py +++ b/test/units/modules/network/eos/test_eos_config.py @@ -19,7 +19,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible.compat.tests.mock import patch, MagicMock +from units.compat.mock import patch, MagicMock from ansible.modules.network.eos import eos_config from ansible.plugins.cliconf.eos import Cliconf from units.modules.utils import set_module_args diff --git a/test/units/modules/network/eos/test_eos_eapi.py b/test/units/modules/network/eos/test_eos_eapi.py index dd16ea60cc..3d80f19bd3 100644 --- a/test/units/modules/network/eos/test_eos_eapi.py +++ b/test/units/modules/network/eos/test_eos_eapi.py @@ -19,7 +19,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.eos import eos_eapi from units.modules.utils import set_module_args from .eos_module import TestEosModule, load_fixture diff --git a/test/units/modules/network/eos/test_eos_system.py b/test/units/modules/network/eos/test_eos_system.py index f02687694a..c6f4817ac0 100644 --- a/test/units/modules/network/eos/test_eos_system.py +++ b/test/units/modules/network/eos/test_eos_system.py @@ -19,7 +19,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.eos import eos_system from units.modules.utils import set_module_args from .eos_module import TestEosModule, load_fixture diff --git a/test/units/modules/network/eos/test_eos_user.py b/test/units/modules/network/eos/test_eos_user.py index ac08a2158c..cf539c21c1 100644 --- a/test/units/modules/network/eos/test_eos_user.py +++ b/test/units/modules/network/eos/test_eos_user.py @@ -17,7 +17,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.eos import eos_user from units.modules.utils import set_module_args from .eos_module import TestEosModule, load_fixture diff --git a/test/units/modules/network/exos/test_exos_command.py b/test/units/modules/network/exos/test_exos_command.py index 3c4b38dde3..368ed1bb44 100644 --- a/test/units/modules/network/exos/test_exos_command.py +++ b/test/units/modules/network/exos/test_exos_command.py @@ -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.exos import exos_command from units.modules.utils import set_module_args from .exos_module import TestExosModule, load_fixture diff --git a/test/units/modules/network/exos/test_exos_config.py b/test/units/modules/network/exos/test_exos_config.py index d8ade1366f..ab58ac587a 100644 --- a/test/units/modules/network/exos/test_exos_config.py +++ b/test/units/modules/network/exos/test_exos_config.py @@ -19,7 +19,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.exos import exos_config from units.modules.utils import set_module_args from .exos_module import TestExosModule, load_fixture diff --git a/test/units/modules/network/exos/test_exos_facts.py b/test/units/modules/network/exos/test_exos_facts.py index 2cea34f057..ff60b61f2e 100644 --- a/test/units/modules/network/exos/test_exos_facts.py +++ b/test/units/modules/network/exos/test_exos_facts.py @@ -22,7 +22,7 @@ __metaclass__ = type import os import json -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.modules.network.exos import exos_facts from units.modules.utils import set_module_args from .exos_module import TestExosModule, load_fixture diff --git a/test/units/modules/network/f5/test_bigip_appsvcs_extension.py b/test/units/modules/network/f5/test_bigip_appsvcs_extension.py index ba30bbab39..6240e03ac7 100644 --- a/test/units/modules/network/f5/test_bigip_appsvcs_extension.py +++ b/test/units/modules/network/f5/test_bigip_appsvcs_extension.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_asm_policy.py b/test/units/modules/network/f5/test_bigip_asm_policy.py index 1ba3a3cd05..6b5050b180 100644 --- a/test/units/modules/network/f5/test_bigip_asm_policy.py +++ b/test/units/modules/network/f5/test_bigip_asm_policy.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_cli_alias.py b/test/units/modules/network/f5/test_bigip_cli_alias.py index 2e92f80b1a..8b6effd435 100644 --- a/test/units/modules/network/f5/test_bigip_cli_alias.py +++ b/test/units/modules/network/f5/test_bigip_cli_alias.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_cli_script.py b/test/units/modules/network/f5/test_bigip_cli_script.py index 0feaac9579..a3154965ef 100644 --- a/test/units/modules/network/f5/test_bigip_cli_script.py +++ b/test/units/modules/network/f5/test_bigip_cli_script.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_command.py b/test/units/modules/network/f5/test_bigip_command.py index e26490a446..46748b1a71 100644 --- a/test/units/modules/network/f5/test_bigip_command.py +++ b/test/units/modules/network/f5/test_bigip_command.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import patch -from ansible.compat.tests.mock import Mock +from units.compat import unittest +from units.compat.mock import patch +from units.compat.mock import Mock from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_config.py b/test/units/modules/network/f5/test_bigip_config.py index 173d43f79c..a4dcc4fb98 100644 --- a/test/units/modules/network/f5/test_bigip_config.py +++ b/test/units/modules/network/f5/test_bigip_config.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_configsync_action.py b/test/units/modules/network/f5/test_bigip_configsync_action.py index 7d2997c038..52ea1123a3 100644 --- a/test/units/modules/network/f5/test_bigip_configsync_action.py +++ b/test/units/modules/network/f5/test_bigip_configsync_action.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_configsync_actions.py b/test/units/modules/network/f5/test_bigip_configsync_actions.py index b7269f7a53..719a3b23b2 100644 --- a/test/units/modules/network/f5/test_bigip_configsync_actions.py +++ b/test/units/modules/network/f5/test_bigip_configsync_actions.py @@ -28,8 +28,8 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -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 from ansible.module_utils.f5_utils import AnsibleF5Client from units.modules.utils import set_module_args diff --git a/test/units/modules/network/f5/test_bigip_data_group.py b/test/units/modules/network/f5/test_bigip_data_group.py index 83aacfd6cb..4aed433ee4 100644 --- a/test/units/modules/network/f5/test_bigip_data_group.py +++ b/test/units/modules/network/f5/test_bigip_data_group.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_device_auth.py b/test/units/modules/network/f5/test_bigip_device_auth.py index 1ab9068445..6dbcef8d40 100644 --- a/test/units/modules/network/f5/test_bigip_device_auth.py +++ b/test/units/modules/network/f5/test_bigip_device_auth.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_device_connectivity.py b/test/units/modules/network/f5/test_bigip_device_connectivity.py index 9940e2f28d..d0653c79b1 100644 --- a/test/units/modules/network/f5/test_bigip_device_connectivity.py +++ b/test/units/modules/network/f5/test_bigip_device_connectivity.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_device_dns.py b/test/units/modules/network/f5/test_bigip_device_dns.py index 895bb69ba5..8bedfed4c2 100644 --- a/test/units/modules/network/f5/test_bigip_device_dns.py +++ b/test/units/modules/network/f5/test_bigip_device_dns.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_device_facts.py b/test/units/modules/network/f5/test_bigip_device_facts.py index b21887c6a1..b30c94fa2b 100644 --- a/test/units/modules/network/f5/test_bigip_device_facts.py +++ b/test/units/modules/network/f5/test_bigip_device_facts.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six import iteritems diff --git a/test/units/modules/network/f5/test_bigip_device_group.py b/test/units/modules/network/f5/test_bigip_device_group.py index 93ba4c5311..67f6df97e7 100644 --- a/test/units/modules/network/f5/test_bigip_device_group.py +++ b/test/units/modules/network/f5/test_bigip_device_group.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_device_group_member.py b/test/units/modules/network/f5/test_bigip_device_group_member.py index 84b523192b..6f40ae64f6 100644 --- a/test/units/modules/network/f5/test_bigip_device_group_member.py +++ b/test/units/modules/network/f5/test_bigip_device_group_member.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_device_httpd.py b/test/units/modules/network/f5/test_bigip_device_httpd.py index 0bbac049eb..d469ae67a3 100644 --- a/test/units/modules/network/f5/test_bigip_device_httpd.py +++ b/test/units/modules/network/f5/test_bigip_device_httpd.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_device_license.py b/test/units/modules/network/f5/test_bigip_device_license.py index 40bf2b0b8a..821ea26bea 100644 --- a/test/units/modules/network/f5/test_bigip_device_license.py +++ b/test/units/modules/network/f5/test_bigip_device_license.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_device_ntp.py b/test/units/modules/network/f5/test_bigip_device_ntp.py index ce84c9173b..9bba837b41 100644 --- a/test/units/modules/network/f5/test_bigip_device_ntp.py +++ b/test/units/modules/network/f5/test_bigip_device_ntp.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_device_sshd.py b/test/units/modules/network/f5/test_bigip_device_sshd.py index 341c80dece..62dac4b51b 100644 --- a/test/units/modules/network/f5/test_bigip_device_sshd.py +++ b/test/units/modules/network/f5/test_bigip_device_sshd.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_device_trust.py b/test/units/modules/network/f5/test_bigip_device_trust.py index 3d93977ae4..723832e316 100644 --- a/test/units/modules/network/f5/test_bigip_device_trust.py +++ b/test/units/modules/network/f5/test_bigip_device_trust.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_firewall_address_list.py b/test/units/modules/network/f5/test_bigip_firewall_address_list.py index 1a7ceb938b..7f971b645e 100644 --- a/test/units/modules/network/f5/test_bigip_firewall_address_list.py +++ b/test/units/modules/network/f5/test_bigip_firewall_address_list.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_firewall_dos_profile.py b/test/units/modules/network/f5/test_bigip_firewall_dos_profile.py index 686aebc6ca..881c1a88bd 100644 --- a/test/units/modules/network/f5/test_bigip_firewall_dos_profile.py +++ b/test/units/modules/network/f5/test_bigip_firewall_dos_profile.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_firewall_policy.py b/test/units/modules/network/f5/test_bigip_firewall_policy.py index 78a868be79..1bbd96549c 100644 --- a/test/units/modules/network/f5/test_bigip_firewall_policy.py +++ b/test/units/modules/network/f5/test_bigip_firewall_policy.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_firewall_port_list.py b/test/units/modules/network/f5/test_bigip_firewall_port_list.py index c37a7a636e..9b92fcd177 100644 --- a/test/units/modules/network/f5/test_bigip_firewall_port_list.py +++ b/test/units/modules/network/f5/test_bigip_firewall_port_list.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_firewall_rule.py b/test/units/modules/network/f5/test_bigip_firewall_rule.py index 0d1bf6c5b9..e32e89a376 100644 --- a/test/units/modules/network/f5/test_bigip_firewall_rule.py +++ b/test/units/modules/network/f5/test_bigip_firewall_rule.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_firewall_rule_list.py b/test/units/modules/network/f5/test_bigip_firewall_rule_list.py index 93b64dcc21..e8326c1b0e 100644 --- a/test/units/modules/network/f5/test_bigip_firewall_rule_list.py +++ b/test/units/modules/network/f5/test_bigip_firewall_rule_list.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_gtm_datacenter.py b/test/units/modules/network/f5/test_bigip_gtm_datacenter.py index 79d2c80d83..e15109892d 100644 --- a/test/units/modules/network/f5/test_bigip_gtm_datacenter.py +++ b/test/units/modules/network/f5/test_bigip_gtm_datacenter.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_gtm_facts.py b/test/units/modules/network/f5/test_bigip_gtm_facts.py index 25edd8da55..8f0fb3f9c5 100644 --- a/test/units/modules/network/f5/test_bigip_gtm_facts.py +++ b/test/units/modules/network/f5/test_bigip_gtm_facts.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six import iteritems diff --git a/test/units/modules/network/f5/test_bigip_gtm_global.py b/test/units/modules/network/f5/test_bigip_gtm_global.py index c503b322de..b24833f650 100644 --- a/test/units/modules/network/f5/test_bigip_gtm_global.py +++ b/test/units/modules/network/f5/test_bigip_gtm_global.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_gtm_monitor_bigip.py b/test/units/modules/network/f5/test_bigip_gtm_monitor_bigip.py index fe1c413df8..4342d4a3c9 100644 --- a/test/units/modules/network/f5/test_bigip_gtm_monitor_bigip.py +++ b/test/units/modules/network/f5/test_bigip_gtm_monitor_bigip.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_gtm_monitor_external.py b/test/units/modules/network/f5/test_bigip_gtm_monitor_external.py index 308dc63351..ac9b0f0120 100644 --- a/test/units/modules/network/f5/test_bigip_gtm_monitor_external.py +++ b/test/units/modules/network/f5/test_bigip_gtm_monitor_external.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_gtm_monitor_firepass.py b/test/units/modules/network/f5/test_bigip_gtm_monitor_firepass.py index 81ac38f29e..296c942717 100644 --- a/test/units/modules/network/f5/test_bigip_gtm_monitor_firepass.py +++ b/test/units/modules/network/f5/test_bigip_gtm_monitor_firepass.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_gtm_monitor_http.py b/test/units/modules/network/f5/test_bigip_gtm_monitor_http.py index 3c47943f45..a8fe25b53b 100644 --- a/test/units/modules/network/f5/test_bigip_gtm_monitor_http.py +++ b/test/units/modules/network/f5/test_bigip_gtm_monitor_http.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_gtm_monitor_https.py b/test/units/modules/network/f5/test_bigip_gtm_monitor_https.py index a3da6dbb52..cbb48497e7 100644 --- a/test/units/modules/network/f5/test_bigip_gtm_monitor_https.py +++ b/test/units/modules/network/f5/test_bigip_gtm_monitor_https.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_gtm_monitor_tcp.py b/test/units/modules/network/f5/test_bigip_gtm_monitor_tcp.py index 8f9c1a0171..d860191978 100644 --- a/test/units/modules/network/f5/test_bigip_gtm_monitor_tcp.py +++ b/test/units/modules/network/f5/test_bigip_gtm_monitor_tcp.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_gtm_monitor_tcp_half_open.py b/test/units/modules/network/f5/test_bigip_gtm_monitor_tcp_half_open.py index 4e8690680f..84c3171969 100644 --- a/test/units/modules/network/f5/test_bigip_gtm_monitor_tcp_half_open.py +++ b/test/units/modules/network/f5/test_bigip_gtm_monitor_tcp_half_open.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_gtm_pool.py b/test/units/modules/network/f5/test_bigip_gtm_pool.py index 198965e06a..e995420e0e 100644 --- a/test/units/modules/network/f5/test_bigip_gtm_pool.py +++ b/test/units/modules/network/f5/test_bigip_gtm_pool.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_gtm_pool_member.py b/test/units/modules/network/f5/test_bigip_gtm_pool_member.py index 7e45a1c90b..335b262d87 100644 --- a/test/units/modules/network/f5/test_bigip_gtm_pool_member.py +++ b/test/units/modules/network/f5/test_bigip_gtm_pool_member.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_gtm_server.py b/test/units/modules/network/f5/test_bigip_gtm_server.py index 6bf7ed522c..9ae64108b9 100644 --- a/test/units/modules/network/f5/test_bigip_gtm_server.py +++ b/test/units/modules/network/f5/test_bigip_gtm_server.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_gtm_virtual_server.py b/test/units/modules/network/f5/test_bigip_gtm_virtual_server.py index 39e1f3d7d7..c6f00aea07 100644 --- a/test/units/modules/network/f5/test_bigip_gtm_virtual_server.py +++ b/test/units/modules/network/f5/test_bigip_gtm_virtual_server.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_gtm_wide_ip.py b/test/units/modules/network/f5/test_bigip_gtm_wide_ip.py index 9bd1cb9950..b8da9ab6b6 100644 --- a/test/units/modules/network/f5/test_bigip_gtm_wide_ip.py +++ b/test/units/modules/network/f5/test_bigip_gtm_wide_ip.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_hostname.py b/test/units/modules/network/f5/test_bigip_hostname.py index 43c6668354..d2fb2faac6 100644 --- a/test/units/modules/network/f5/test_bigip_hostname.py +++ b/test/units/modules/network/f5/test_bigip_hostname.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_iapp_service.py b/test/units/modules/network/f5/test_bigip_iapp_service.py index b34cdbb9dd..6c7ea639fc 100644 --- a/test/units/modules/network/f5/test_bigip_iapp_service.py +++ b/test/units/modules/network/f5/test_bigip_iapp_service.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_iapp_template.py b/test/units/modules/network/f5/test_bigip_iapp_template.py index 426f0a1372..c1305fcfd0 100644 --- a/test/units/modules/network/f5/test_bigip_iapp_template.py +++ b/test/units/modules/network/f5/test_bigip_iapp_template.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_iapplx_package.py b/test/units/modules/network/f5/test_bigip_iapplx_package.py index 181b5bde77..75152dcc05 100644 --- a/test/units/modules/network/f5/test_bigip_iapplx_package.py +++ b/test/units/modules/network/f5/test_bigip_iapplx_package.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_irule.py b/test/units/modules/network/f5/test_bigip_irule.py index ffe148e1ed..d6dc934bd3 100644 --- a/test/units/modules/network/f5/test_bigip_irule.py +++ b/test/units/modules/network/f5/test_bigip_irule.py @@ -14,10 +14,10 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch -from ansible.compat.tests.mock import mock_open +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch +from units.compat.mock import mock_open from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six import PY3 diff --git a/test/units/modules/network/f5/test_bigip_log_destination.py b/test/units/modules/network/f5/test_bigip_log_destination.py index 57261b197e..add7b665ae 100644 --- a/test/units/modules/network/f5/test_bigip_log_destination.py +++ b/test/units/modules/network/f5/test_bigip_log_destination.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_log_publisher.py b/test/units/modules/network/f5/test_bigip_log_publisher.py index 164d2445db..4d3f875db3 100644 --- a/test/units/modules/network/f5/test_bigip_log_publisher.py +++ b/test/units/modules/network/f5/test_bigip_log_publisher.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_management_route.py b/test/units/modules/network/f5/test_bigip_management_route.py index 383c8829d1..cb5cc8be59 100644 --- a/test/units/modules/network/f5/test_bigip_management_route.py +++ b/test/units/modules/network/f5/test_bigip_management_route.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_monitor_dns.py b/test/units/modules/network/f5/test_bigip_monitor_dns.py index 6201be3214..6291c99f5c 100644 --- a/test/units/modules/network/f5/test_bigip_monitor_dns.py +++ b/test/units/modules/network/f5/test_bigip_monitor_dns.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_monitor_external.py b/test/units/modules/network/f5/test_bigip_monitor_external.py index 5b6293b6fd..6ad8967de4 100644 --- a/test/units/modules/network/f5/test_bigip_monitor_external.py +++ b/test/units/modules/network/f5/test_bigip_monitor_external.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_monitor_http.py b/test/units/modules/network/f5/test_bigip_monitor_http.py index 2d1c436f8a..e4596707ba 100644 --- a/test/units/modules/network/f5/test_bigip_monitor_http.py +++ b/test/units/modules/network/f5/test_bigip_monitor_http.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_monitor_https.py b/test/units/modules/network/f5/test_bigip_monitor_https.py index 0b68298f97..3013b787a3 100644 --- a/test/units/modules/network/f5/test_bigip_monitor_https.py +++ b/test/units/modules/network/f5/test_bigip_monitor_https.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_monitor_snmp_dca.py b/test/units/modules/network/f5/test_bigip_monitor_snmp_dca.py index bd7fbdcfd5..866f0ac52a 100644 --- a/test/units/modules/network/f5/test_bigip_monitor_snmp_dca.py +++ b/test/units/modules/network/f5/test_bigip_monitor_snmp_dca.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_monitor_tcp.py b/test/units/modules/network/f5/test_bigip_monitor_tcp.py index c60ac66ad4..3d5f6a81e7 100644 --- a/test/units/modules/network/f5/test_bigip_monitor_tcp.py +++ b/test/units/modules/network/f5/test_bigip_monitor_tcp.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_monitor_tcp_echo.py b/test/units/modules/network/f5/test_bigip_monitor_tcp_echo.py index 2ae5397742..fa5389f296 100644 --- a/test/units/modules/network/f5/test_bigip_monitor_tcp_echo.py +++ b/test/units/modules/network/f5/test_bigip_monitor_tcp_echo.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_monitor_tcp_half_open.py b/test/units/modules/network/f5/test_bigip_monitor_tcp_half_open.py index 1c33d40565..0e69a6507b 100644 --- a/test/units/modules/network/f5/test_bigip_monitor_tcp_half_open.py +++ b/test/units/modules/network/f5/test_bigip_monitor_tcp_half_open.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_monitor_udp.py b/test/units/modules/network/f5/test_bigip_monitor_udp.py index c9431d4e3d..a47283dc8d 100644 --- a/test/units/modules/network/f5/test_bigip_monitor_udp.py +++ b/test/units/modules/network/f5/test_bigip_monitor_udp.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_node.py b/test/units/modules/network/f5/test_bigip_node.py index 181b7f2eca..6427128d2b 100644 --- a/test/units/modules/network/f5/test_bigip_node.py +++ b/test/units/modules/network/f5/test_bigip_node.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_partition.py b/test/units/modules/network/f5/test_bigip_partition.py index c4aa79f7b2..2b9ad1e9b0 100644 --- a/test/units/modules/network/f5/test_bigip_partition.py +++ b/test/units/modules/network/f5/test_bigip_partition.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_policy.py b/test/units/modules/network/f5/test_bigip_policy.py index 0441025076..2af78f7553 100644 --- a/test/units/modules/network/f5/test_bigip_policy.py +++ b/test/units/modules/network/f5/test_bigip_policy.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_policy_rule.py b/test/units/modules/network/f5/test_bigip_policy_rule.py index 33f82e8a1f..55095ad3b3 100644 --- a/test/units/modules/network/f5/test_bigip_policy_rule.py +++ b/test/units/modules/network/f5/test_bigip_policy_rule.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_pool.py b/test/units/modules/network/f5/test_bigip_pool.py index e2b2d788b5..8a8cc83c38 100644 --- a/test/units/modules/network/f5/test_bigip_pool.py +++ b/test/units/modules/network/f5/test_bigip_pool.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_pool_member.py b/test/units/modules/network/f5/test_bigip_pool_member.py index 381f0241f1..2858897fe8 100644 --- a/test/units/modules/network/f5/test_bigip_pool_member.py +++ b/test/units/modules/network/f5/test_bigip_pool_member.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_profile_client_ssl.py b/test/units/modules/network/f5/test_bigip_profile_client_ssl.py index a2c2e6d370..c4ccd40260 100644 --- a/test/units/modules/network/f5/test_bigip_profile_client_ssl.py +++ b/test/units/modules/network/f5/test_bigip_profile_client_ssl.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_profile_dns.py b/test/units/modules/network/f5/test_bigip_profile_dns.py index ef482b9d1a..5ee319a709 100644 --- a/test/units/modules/network/f5/test_bigip_profile_dns.py +++ b/test/units/modules/network/f5/test_bigip_profile_dns.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_profile_http.py b/test/units/modules/network/f5/test_bigip_profile_http.py index 63c2cf2fa5..0aa9a8ccb7 100644 --- a/test/units/modules/network/f5/test_bigip_profile_http.py +++ b/test/units/modules/network/f5/test_bigip_profile_http.py @@ -14,8 +14,8 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock +from units.compat import unittest +from units.compat.mock import Mock from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_profile_http_compression.py b/test/units/modules/network/f5/test_bigip_profile_http_compression.py index 000c4ded9a..0095459d2c 100644 --- a/test/units/modules/network/f5/test_bigip_profile_http_compression.py +++ b/test/units/modules/network/f5/test_bigip_profile_http_compression.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_profile_oneconnect.py b/test/units/modules/network/f5/test_bigip_profile_oneconnect.py index b3ae7b7812..c12246127e 100644 --- a/test/units/modules/network/f5/test_bigip_profile_oneconnect.py +++ b/test/units/modules/network/f5/test_bigip_profile_oneconnect.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_profile_persistence_src_addr.py b/test/units/modules/network/f5/test_bigip_profile_persistence_src_addr.py index 58a5bb2597..3a59957148 100644 --- a/test/units/modules/network/f5/test_bigip_profile_persistence_src_addr.py +++ b/test/units/modules/network/f5/test_bigip_profile_persistence_src_addr.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_profile_tcp.py b/test/units/modules/network/f5/test_bigip_profile_tcp.py index 74951c308b..8ca65f6743 100644 --- a/test/units/modules/network/f5/test_bigip_profile_tcp.py +++ b/test/units/modules/network/f5/test_bigip_profile_tcp.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_profile_udp.py b/test/units/modules/network/f5/test_bigip_profile_udp.py index 30122f7867..f8b7ae8b87 100644 --- a/test/units/modules/network/f5/test_bigip_profile_udp.py +++ b/test/units/modules/network/f5/test_bigip_profile_udp.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_provision.py b/test/units/modules/network/f5/test_bigip_provision.py index e8d81d8515..df7f37c7b4 100644 --- a/test/units/modules/network/f5/test_bigip_provision.py +++ b/test/units/modules/network/f5/test_bigip_provision.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_qkview.py b/test/units/modules/network/f5/test_bigip_qkview.py index 74714f9718..78a0179ea1 100644 --- a/test/units/modules/network/f5/test_bigip_qkview.py +++ b/test/units/modules/network/f5/test_bigip_qkview.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_remote_role.py b/test/units/modules/network/f5/test_bigip_remote_role.py index ec02a600a5..5bf5643fb1 100644 --- a/test/units/modules/network/f5/test_bigip_remote_role.py +++ b/test/units/modules/network/f5/test_bigip_remote_role.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_remote_syslog.py b/test/units/modules/network/f5/test_bigip_remote_syslog.py index 53b996651b..9f64773228 100644 --- a/test/units/modules/network/f5/test_bigip_remote_syslog.py +++ b/test/units/modules/network/f5/test_bigip_remote_syslog.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_routedomain.py b/test/units/modules/network/f5/test_bigip_routedomain.py index 5bb1894fb5..83e3279c67 100644 --- a/test/units/modules/network/f5/test_bigip_routedomain.py +++ b/test/units/modules/network/f5/test_bigip_routedomain.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_security_address_list.py b/test/units/modules/network/f5/test_bigip_security_address_list.py index 0688cdbdff..7e67018382 100644 --- a/test/units/modules/network/f5/test_bigip_security_address_list.py +++ b/test/units/modules/network/f5/test_bigip_security_address_list.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_security_port_list.py b/test/units/modules/network/f5/test_bigip_security_port_list.py index 563a19527a..0dac2fb8c0 100644 --- a/test/units/modules/network/f5/test_bigip_security_port_list.py +++ b/test/units/modules/network/f5/test_bigip_security_port_list.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_selfip.py b/test/units/modules/network/f5/test_bigip_selfip.py index 8f4f76e0d8..6fc5358e79 100644 --- a/test/units/modules/network/f5/test_bigip_selfip.py +++ b/test/units/modules/network/f5/test_bigip_selfip.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_service_policy.py b/test/units/modules/network/f5/test_bigip_service_policy.py index 07031709b0..3d149139c9 100644 --- a/test/units/modules/network/f5/test_bigip_service_policy.py +++ b/test/units/modules/network/f5/test_bigip_service_policy.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_smtp.py b/test/units/modules/network/f5/test_bigip_smtp.py index d24882cffa..6f78cb8758 100644 --- a/test/units/modules/network/f5/test_bigip_smtp.py +++ b/test/units/modules/network/f5/test_bigip_smtp.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_snat_pool.py b/test/units/modules/network/f5/test_bigip_snat_pool.py index 04518b122e..f40e5a0247 100644 --- a/test/units/modules/network/f5/test_bigip_snat_pool.py +++ b/test/units/modules/network/f5/test_bigip_snat_pool.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_snmp.py b/test/units/modules/network/f5/test_bigip_snmp.py index e2fab88179..ca9e979912 100644 --- a/test/units/modules/network/f5/test_bigip_snmp.py +++ b/test/units/modules/network/f5/test_bigip_snmp.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_snmp_community.py b/test/units/modules/network/f5/test_bigip_snmp_community.py index b4b9dcc960..a40f6d6031 100644 --- a/test/units/modules/network/f5/test_bigip_snmp_community.py +++ b/test/units/modules/network/f5/test_bigip_snmp_community.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_snmp_trap.py b/test/units/modules/network/f5/test_bigip_snmp_trap.py index eb34e95121..05170ee226 100644 --- a/test/units/modules/network/f5/test_bigip_snmp_trap.py +++ b/test/units/modules/network/f5/test_bigip_snmp_trap.py @@ -14,10 +14,10 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch -from ansible.compat.tests.mock import DEFAULT +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch +from units.compat.mock import DEFAULT from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_software_image.py b/test/units/modules/network/f5/test_bigip_software_image.py index d013d310eb..c444af2f09 100644 --- a/test/units/modules/network/f5/test_bigip_software_image.py +++ b/test/units/modules/network/f5/test_bigip_software_image.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_software_install.py b/test/units/modules/network/f5/test_bigip_software_install.py index 134f35d78c..5e3e7e0f9f 100644 --- a/test/units/modules/network/f5/test_bigip_software_install.py +++ b/test/units/modules/network/f5/test_bigip_software_install.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_software_update.py b/test/units/modules/network/f5/test_bigip_software_update.py index 7820dc73aa..840c541cc1 100644 --- a/test/units/modules/network/f5/test_bigip_software_update.py +++ b/test/units/modules/network/f5/test_bigip_software_update.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_ssl_certificate.py b/test/units/modules/network/f5/test_bigip_ssl_certificate.py index 2fee49a16b..4cbc479365 100644 --- a/test/units/modules/network/f5/test_bigip_ssl_certificate.py +++ b/test/units/modules/network/f5/test_bigip_ssl_certificate.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_ssl_key.py b/test/units/modules/network/f5/test_bigip_ssl_key.py index b131f8f8b7..336c0a19a1 100644 --- a/test/units/modules/network/f5/test_bigip_ssl_key.py +++ b/test/units/modules/network/f5/test_bigip_ssl_key.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_static_route.py b/test/units/modules/network/f5/test_bigip_static_route.py index 08872d9aef..f44eeaa401 100644 --- a/test/units/modules/network/f5/test_bigip_static_route.py +++ b/test/units/modules/network/f5/test_bigip_static_route.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_sys_db.py b/test/units/modules/network/f5/test_bigip_sys_db.py index ce8a9ddc53..17f051eb99 100644 --- a/test/units/modules/network/f5/test_bigip_sys_db.py +++ b/test/units/modules/network/f5/test_bigip_sys_db.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_sys_global.py b/test/units/modules/network/f5/test_bigip_sys_global.py index 7485cf17dd..c99b81995a 100644 --- a/test/units/modules/network/f5/test_bigip_sys_global.py +++ b/test/units/modules/network/f5/test_bigip_sys_global.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_timer_policy.py b/test/units/modules/network/f5/test_bigip_timer_policy.py index f88d743bfc..1b3e9df9d6 100644 --- a/test/units/modules/network/f5/test_bigip_timer_policy.py +++ b/test/units/modules/network/f5/test_bigip_timer_policy.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_traffic_group.py b/test/units/modules/network/f5/test_bigip_traffic_group.py index 9c3caa7341..dbc00e8b37 100644 --- a/test/units/modules/network/f5/test_bigip_traffic_group.py +++ b/test/units/modules/network/f5/test_bigip_traffic_group.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_trunk.py b/test/units/modules/network/f5/test_bigip_trunk.py index 72fb29fff9..e1e56116f5 100644 --- a/test/units/modules/network/f5/test_bigip_trunk.py +++ b/test/units/modules/network/f5/test_bigip_trunk.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_tunnel.py b/test/units/modules/network/f5/test_bigip_tunnel.py index 53099a387a..cb6facc277 100644 --- a/test/units/modules/network/f5/test_bigip_tunnel.py +++ b/test/units/modules/network/f5/test_bigip_tunnel.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_ucs.py b/test/units/modules/network/f5/test_bigip_ucs.py index 21fba92ae6..d0268981b5 100644 --- a/test/units/modules/network/f5/test_bigip_ucs.py +++ b/test/units/modules/network/f5/test_bigip_ucs.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_ucs_fetch.py b/test/units/modules/network/f5/test_bigip_ucs_fetch.py index f4bdef7601..2ed9e8c337 100644 --- a/test/units/modules/network/f5/test_bigip_ucs_fetch.py +++ b/test/units/modules/network/f5/test_bigip_ucs_fetch.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_user.py b/test/units/modules/network/f5/test_bigip_user.py index b21e77d8ab..1be7054986 100644 --- a/test/units/modules/network/f5/test_bigip_user.py +++ b/test/units/modules/network/f5/test_bigip_user.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_vcmp_guest.py b/test/units/modules/network/f5/test_bigip_vcmp_guest.py index 1bdec45b01..8d0d4a286b 100644 --- a/test/units/modules/network/f5/test_bigip_vcmp_guest.py +++ b/test/units/modules/network/f5/test_bigip_vcmp_guest.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_virtual_address.py b/test/units/modules/network/f5/test_bigip_virtual_address.py index b4ae6a919e..6a8360d1a6 100644 --- a/test/units/modules/network/f5/test_bigip_virtual_address.py +++ b/test/units/modules/network/f5/test_bigip_virtual_address.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_virtual_server.py b/test/units/modules/network/f5/test_bigip_virtual_server.py index c2b170f638..1fcc24f17d 100644 --- a/test/units/modules/network/f5/test_bigip_virtual_server.py +++ b/test/units/modules/network/f5/test_bigip_virtual_server.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_vlan.py b/test/units/modules/network/f5/test_bigip_vlan.py index a98c2cafe3..8af7f42b61 100644 --- a/test/units/modules/network/f5/test_bigip_vlan.py +++ b/test/units/modules/network/f5/test_bigip_vlan.py @@ -14,9 +14,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigip_wait.py b/test/units/modules/network/f5/test_bigip_wait.py index cebb7e60fb..d32052a73f 100644 --- a/test/units/modules/network/f5/test_bigip_wait.py +++ b/test/units/modules/network/f5/test_bigip_wait.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigiq_application_fasthttp.py b/test/units/modules/network/f5/test_bigiq_application_fasthttp.py index f1562c7266..bbee5b0557 100644 --- a/test/units/modules/network/f5/test_bigiq_application_fasthttp.py +++ b/test/units/modules/network/f5/test_bigiq_application_fasthttp.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigiq_application_fastl4_tcp.py b/test/units/modules/network/f5/test_bigiq_application_fastl4_tcp.py index d27f6795ce..316d1c8ede 100644 --- a/test/units/modules/network/f5/test_bigiq_application_fastl4_tcp.py +++ b/test/units/modules/network/f5/test_bigiq_application_fastl4_tcp.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigiq_application_fastl4_udp.py b/test/units/modules/network/f5/test_bigiq_application_fastl4_udp.py index b36170b173..4bb1c5053a 100644 --- a/test/units/modules/network/f5/test_bigiq_application_fastl4_udp.py +++ b/test/units/modules/network/f5/test_bigiq_application_fastl4_udp.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigiq_application_http.py b/test/units/modules/network/f5/test_bigiq_application_http.py index e15b1b32d5..df01ff4504 100644 --- a/test/units/modules/network/f5/test_bigiq_application_http.py +++ b/test/units/modules/network/f5/test_bigiq_application_http.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigiq_application_https_offload.py b/test/units/modules/network/f5/test_bigiq_application_https_offload.py index 592c5a7b07..928799f167 100644 --- a/test/units/modules/network/f5/test_bigiq_application_https_offload.py +++ b/test/units/modules/network/f5/test_bigiq_application_https_offload.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigiq_application_https_waf.py b/test/units/modules/network/f5/test_bigiq_application_https_waf.py index f5cf59709f..2245cd6320 100644 --- a/test/units/modules/network/f5/test_bigiq_application_https_waf.py +++ b/test/units/modules/network/f5/test_bigiq_application_https_waf.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigiq_device_facts.py b/test/units/modules/network/f5/test_bigiq_device_facts.py index 5bb1c67939..c18a8c6d21 100644 --- a/test/units/modules/network/f5/test_bigiq_device_facts.py +++ b/test/units/modules/network/f5/test_bigiq_device_facts.py @@ -14,8 +14,8 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock +from units.compat import unittest +from units.compat.mock import Mock from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigiq_regkey_license.py b/test/units/modules/network/f5/test_bigiq_regkey_license.py index 9301d512d1..3253b9c768 100644 --- a/test/units/modules/network/f5/test_bigiq_regkey_license.py +++ b/test/units/modules/network/f5/test_bigiq_regkey_license.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigiq_regkey_license_assignment.py b/test/units/modules/network/f5/test_bigiq_regkey_license_assignment.py index d4c7de4e2f..0c1526cecd 100644 --- a/test/units/modules/network/f5/test_bigiq_regkey_license_assignment.py +++ b/test/units/modules/network/f5/test_bigiq_regkey_license_assignment.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigiq_regkey_pool.py b/test/units/modules/network/f5/test_bigiq_regkey_pool.py index e323ebd803..366b3cb4ac 100644 --- a/test/units/modules/network/f5/test_bigiq_regkey_pool.py +++ b/test/units/modules/network/f5/test_bigiq_regkey_pool.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigiq_utility_license.py b/test/units/modules/network/f5/test_bigiq_utility_license.py index 1abead1c20..fe8365254a 100644 --- a/test/units/modules/network/f5/test_bigiq_utility_license.py +++ b/test/units/modules/network/f5/test_bigiq_utility_license.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/f5/test_bigiq_utility_license_assignment.py b/test/units/modules/network/f5/test_bigiq_utility_license_assignment.py index af7a54a406..a0d396279b 100644 --- a/test/units/modules/network/f5/test_bigiq_utility_license_assignment.py +++ b/test/units/modules/network/f5/test_bigiq_utility_license_assignment.py @@ -15,9 +15,9 @@ from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import Mock +from units.compat.mock import patch from ansible.module_utils.basic import AnsibleModule try: diff --git a/test/units/modules/network/ios/test_ios_banner.py b/test/units/modules/network/ios/test_ios_banner.py index 418fb50356..d01037d97d 100644 --- a/test/units/modules/network/ios/test_ios_banner.py +++ b/test/units/modules/network/ios/test_ios_banner.py @@ -17,7 +17,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.ios import ios_banner from units.modules.utils import set_module_args from .ios_module import TestIosModule, load_fixture diff --git a/test/units/modules/network/ios/test_ios_command.py b/test/units/modules/network/ios/test_ios_command.py index d793c4bb45..1dab227b9a 100644 --- a/test/units/modules/network/ios/test_ios_command.py +++ b/test/units/modules/network/ios/test_ios_command.py @@ -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.ios import ios_command from units.modules.utils import set_module_args from .ios_module import TestIosModule, load_fixture diff --git a/test/units/modules/network/ios/test_ios_config.py b/test/units/modules/network/ios/test_ios_config.py index ef87fb055a..a6030e5823 100644 --- a/test/units/modules/network/ios/test_ios_config.py +++ b/test/units/modules/network/ios/test_ios_config.py @@ -20,7 +20,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible.compat.tests.mock import patch, MagicMock +from units.compat.mock import patch, MagicMock from ansible.modules.network.ios import ios_config from ansible.plugins.cliconf.ios import Cliconf from units.modules.utils import set_module_args diff --git a/test/units/modules/network/ios/test_ios_facts.py b/test/units/modules/network/ios/test_ios_facts.py index b6d0a711c0..cb5f82539e 100644 --- a/test/units/modules/network/ios/test_ios_facts.py +++ b/test/units/modules/network/ios/test_ios_facts.py @@ -17,7 +17,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.ios import ios_facts from units.modules.utils import set_module_args from .ios_module import TestIosModule, load_fixture diff --git a/test/units/modules/network/ios/test_ios_logging.py b/test/units/modules/network/ios/test_ios_logging.py index 681b03fbed..2031302b88 100644 --- a/test/units/modules/network/ios/test_ios_logging.py +++ b/test/units/modules/network/ios/test_ios_logging.py @@ -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.ios import ios_logging from units.modules.utils import set_module_args from .ios_module import TestIosModule, load_fixture diff --git a/test/units/modules/network/ios/test_ios_ping.py b/test/units/modules/network/ios/test_ios_ping.py index 8d1b2a1aee..c221137e02 100644 --- a/test/units/modules/network/ios/test_ios_ping.py +++ b/test/units/modules/network/ios/test_ios_ping.py @@ -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.ios import ios_ping from units.modules.utils import set_module_args from .ios_module import TestIosModule, load_fixture diff --git a/test/units/modules/network/ios/test_ios_system.py b/test/units/modules/network/ios/test_ios_system.py index 3e37d8b3a1..0d43949f47 100644 --- a/test/units/modules/network/ios/test_ios_system.py +++ b/test/units/modules/network/ios/test_ios_system.py @@ -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.ios import ios_system from units.modules.utils import set_module_args from .ios_module import TestIosModule, load_fixture diff --git a/test/units/modules/network/ios/test_ios_user.py b/test/units/modules/network/ios/test_ios_user.py index 8d836bada5..43b3ce70b6 100644 --- a/test/units/modules/network/ios/test_ios_user.py +++ b/test/units/modules/network/ios/test_ios_user.py @@ -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.ios import ios_user from units.modules.utils import set_module_args from .ios_module import TestIosModule, load_fixture diff --git a/test/units/modules/network/ios/test_ios_vlan.py b/test/units/modules/network/ios/test_ios_vlan.py index 6c8926fb09..d7533eccd5 100644 --- a/test/units/modules/network/ios/test_ios_vlan.py +++ b/test/units/modules/network/ios/test_ios_vlan.py @@ -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.ios import ios_vlan from ansible.modules.network.ios.ios_vlan import parse_vlan_brief from units.modules.utils import set_module_args diff --git a/test/units/modules/network/ios/test_ios_vrf.py b/test/units/modules/network/ios/test_ios_vrf.py index 1565a65074..31c701360c 100644 --- a/test/units/modules/network/ios/test_ios_vrf.py +++ b/test/units/modules/network/ios/test_ios_vrf.py @@ -21,7 +21,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.ios import ios_vrf from units.modules.utils import set_module_args from .ios_module import TestIosModule, load_fixture diff --git a/test/units/modules/network/iosxr/test_iosxr_command.py b/test/units/modules/network/iosxr/test_iosxr_command.py index 29b3de7b99..49242939e4 100644 --- a/test/units/modules/network/iosxr/test_iosxr_command.py +++ b/test/units/modules/network/iosxr/test_iosxr_command.py @@ -19,7 +19,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.iosxr import iosxr_command from units.modules.utils import set_module_args from .iosxr_module import TestIosxrModule, load_fixture diff --git a/test/units/modules/network/iosxr/test_iosxr_config.py b/test/units/modules/network/iosxr/test_iosxr_config.py index 7d28e4a2af..fb374b6b0f 100644 --- a/test/units/modules/network/iosxr/test_iosxr_config.py +++ b/test/units/modules/network/iosxr/test_iosxr_config.py @@ -20,7 +20,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible.compat.tests.mock import patch, MagicMock +from units.compat.mock import patch, MagicMock from ansible.modules.network.iosxr import iosxr_config from ansible.plugins.cliconf.iosxr import Cliconf from units.modules.utils import set_module_args diff --git a/test/units/modules/network/iosxr/test_iosxr_facts.py b/test/units/modules/network/iosxr/test_iosxr_facts.py index 240a8e6c6a..0eebe9952b 100644 --- a/test/units/modules/network/iosxr/test_iosxr_facts.py +++ b/test/units/modules/network/iosxr/test_iosxr_facts.py @@ -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 .iosxr_module import TestIosxrModule, load_fixture from ansible.modules.network.iosxr import iosxr_facts diff --git a/test/units/modules/network/iosxr/test_iosxr_netconf.py b/test/units/modules/network/iosxr/test_iosxr_netconf.py index f7d7fa3120..a6f8b65cc1 100644 --- a/test/units/modules/network/iosxr/test_iosxr_netconf.py +++ b/test/units/modules/network/iosxr/test_iosxr_netconf.py @@ -19,7 +19,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.iosxr import iosxr_netconf from units.modules.utils import set_module_args from .iosxr_module import TestIosxrModule diff --git a/test/units/modules/network/iosxr/test_iosxr_system.py b/test/units/modules/network/iosxr/test_iosxr_system.py index 6cf95bdfb7..4d16f54aac 100644 --- a/test/units/modules/network/iosxr/test_iosxr_system.py +++ b/test/units/modules/network/iosxr/test_iosxr_system.py @@ -19,7 +19,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 units.modules.utils import set_module_args from .iosxr_module import TestIosxrModule, load_fixture from ansible.modules.network.iosxr import iosxr_system diff --git a/test/units/modules/network/iosxr/test_iosxr_user.py b/test/units/modules/network/iosxr/test_iosxr_user.py index 9e2bbc0679..3c07f89680 100644 --- a/test/units/modules/network/iosxr/test_iosxr_user.py +++ b/test/units/modules/network/iosxr/test_iosxr_user.py @@ -19,7 +19,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.iosxr import iosxr_user from units.modules.utils import set_module_args from .iosxr_module import TestIosxrModule, load_fixture diff --git a/test/units/modules/network/ironware/test_ironware_command.py b/test/units/modules/network/ironware/test_ironware_command.py index f7d53e0e04..7cdd64bada 100644 --- a/test/units/modules/network/ironware/test_ironware_command.py +++ b/test/units/modules/network/ironware/test_ironware_command.py @@ -19,7 +19,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.ironware import ironware_command from units.modules.utils import set_module_args from .ironware_module import TestIronwareModule, load_fixture diff --git a/test/units/modules/network/ironware/test_ironware_config.py b/test/units/modules/network/ironware/test_ironware_config.py index ad228db05a..9ab2dc7474 100644 --- a/test/units/modules/network/ironware/test_ironware_config.py +++ b/test/units/modules/network/ironware/test_ironware_config.py @@ -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.ironware import ironware_config from .ironware_module import TestIronwareModule, load_fixture from units.modules.utils import set_module_args diff --git a/test/units/modules/network/ironware/test_ironware_facts.py b/test/units/modules/network/ironware/test_ironware_facts.py index 44792706d8..145c4451b0 100644 --- a/test/units/modules/network/ironware/test_ironware_facts.py +++ b/test/units/modules/network/ironware/test_ironware_facts.py @@ -21,7 +21,7 @@ __metaclass__ = type import json -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from .ironware_module import TestIronwareModule, load_fixture from ansible.modules.network.ironware import ironware_facts from units.modules.utils import set_module_args diff --git a/test/units/modules/network/junos/test_junos_command.py b/test/units/modules/network/junos/test_junos_command.py index d1e3232227..3bff372c82 100644 --- a/test/units/modules/network/junos/test_junos_command.py +++ b/test/units/modules/network/junos/test_junos_command.py @@ -24,7 +24,7 @@ try: except ImportError: from xml.etree.ElementTree import fromstring -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.modules.network.junos import junos_command from units.modules.utils import set_module_args from .junos_module import TestJunosModule, load_fixture diff --git a/test/units/modules/network/junos/test_junos_config.py b/test/units/modules/network/junos/test_junos_config.py index d42dcaccce..e6ee49a750 100644 --- a/test/units/modules/network/junos/test_junos_config.py +++ b/test/units/modules/network/junos/test_junos_config.py @@ -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.junos import junos_config from units.modules.utils import set_module_args from ansible.module_utils._text import to_text diff --git a/test/units/modules/network/junos/test_junos_facts.py b/test/units/modules/network/junos/test_junos_facts.py index 512ad18a37..638b378ab8 100644 --- a/test/units/modules/network/junos/test_junos_facts.py +++ b/test/units/modules/network/junos/test_junos_facts.py @@ -24,7 +24,7 @@ try: except ImportError: from xml.etree.ElementTree import fromstring -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.modules.network.junos import junos_facts from units.modules.utils import set_module_args from .junos_module import TestJunosModule, load_fixture diff --git a/test/units/modules/network/junos/test_junos_netconf.py b/test/units/modules/network/junos/test_junos_netconf.py index 405a44b598..228cf9febc 100644 --- a/test/units/modules/network/junos/test_junos_netconf.py +++ b/test/units/modules/network/junos/test_junos_netconf.py @@ -19,7 +19,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.junos import junos_netconf from units.modules.utils import set_module_args from .junos_module import TestJunosModule diff --git a/test/units/modules/network/junos/test_junos_package.py b/test/units/modules/network/junos/test_junos_package.py index 31dd778f75..57446550b8 100644 --- a/test/units/modules/network/junos/test_junos_package.py +++ b/test/units/modules/network/junos/test_junos_package.py @@ -19,7 +19,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible.compat.tests.mock import patch, MagicMock +from units.compat.mock import patch, MagicMock from units.modules.utils import set_module_args from .junos_module import TestJunosModule jnpr_mock = MagicMock() diff --git a/test/units/modules/network/junos/test_junos_rpc.py b/test/units/modules/network/junos/test_junos_rpc.py index 2c71074651..2fa4b95c1f 100644 --- a/test/units/modules/network/junos/test_junos_rpc.py +++ b/test/units/modules/network/junos/test_junos_rpc.py @@ -24,7 +24,7 @@ try: except ImportError: from xml.etree.ElementTree import tostring, fromstring -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.modules.network.junos import junos_rpc from units.modules.utils import set_module_args from .junos_module import TestJunosModule, load_fixture diff --git a/test/units/modules/network/junos/test_junos_scp.py b/test/units/modules/network/junos/test_junos_scp.py index 4751d1c499..0750d47f37 100644 --- a/test/units/modules/network/junos/test_junos_scp.py +++ b/test/units/modules/network/junos/test_junos_scp.py @@ -19,7 +19,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible.compat.tests.mock import patch, MagicMock +from units.compat.mock import patch, MagicMock from units.modules.utils import set_module_args from .junos_module import TestJunosModule jnpr_mock = MagicMock() diff --git a/test/units/modules/network/netact/test_netact_cm_command.py b/test/units/modules/network/netact/test_netact_cm_command.py index b934452997..17f8f7adbe 100644 --- a/test/units/modules/network/netact/test_netact_cm_command.py +++ b/test/units/modules/network/netact/test_netact_cm_command.py @@ -30,11 +30,11 @@ __metaclass__ = type import json -from ansible.compat.tests import unittest +from units.compat import unittest from ansible.module_utils import basic from ansible.module_utils._text import to_bytes from ansible.modules.network.netact import netact_cm_command -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from units.modules.utils import set_module_args, AnsibleExitJson, AnsibleFailJson, ModuleTestCase diff --git a/test/units/modules/network/netscaler/netscaler_module.py b/test/units/modules/network/netscaler/netscaler_module.py index f3715883de..d9650502df 100644 --- a/test/units/modules/network/netscaler/netscaler_module.py +++ b/test/units/modules/network/netscaler/netscaler_module.py @@ -1,6 +1,6 @@ import sys -from ansible.compat.tests.mock import patch, Mock +from units.compat.mock import patch, Mock from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase base_modules_mock = Mock() diff --git a/test/units/modules/network/netscaler/test_netscaler_cs_action.py b/test/units/modules/network/netscaler/test_netscaler_cs_action.py index ab1f0be193..aa1c772c8b 100644 --- a/test/units/modules/network/netscaler/test_netscaler_cs_action.py +++ b/test/units/modules/network/netscaler/test_netscaler_cs_action.py @@ -17,7 +17,7 @@ # along with Ansible. If not, see . # -from ansible.compat.tests.mock import patch, Mock, MagicMock, call +from units.compat.mock import patch, Mock, MagicMock, call from units.modules.utils import set_module_args from .netscaler_module import TestModule, nitro_base_patcher diff --git a/test/units/modules/network/netscaler/test_netscaler_cs_policy.py b/test/units/modules/network/netscaler/test_netscaler_cs_policy.py index 699c382e61..0cb0ab65e8 100644 --- a/test/units/modules/network/netscaler/test_netscaler_cs_policy.py +++ b/test/units/modules/network/netscaler/test_netscaler_cs_policy.py @@ -17,7 +17,7 @@ # along with Ansible. If not, see . # -from ansible.compat.tests.mock import patch, Mock, MagicMock, call +from units.compat.mock import patch, Mock, MagicMock, call import sys diff --git a/test/units/modules/network/netscaler/test_netscaler_cs_vserver.py b/test/units/modules/network/netscaler/test_netscaler_cs_vserver.py index 7e7f4d3439..b264661b65 100644 --- a/test/units/modules/network/netscaler/test_netscaler_cs_vserver.py +++ b/test/units/modules/network/netscaler/test_netscaler_cs_vserver.py @@ -17,7 +17,7 @@ # along with Ansible. If not, see . # -from ansible.compat.tests.mock import patch, Mock, MagicMock, call +from units.compat.mock import patch, Mock, MagicMock, call from units.modules.utils import set_module_args from .netscaler_module import TestModule, nitro_base_patcher diff --git a/test/units/modules/network/netscaler/test_netscaler_gslb_service.py b/test/units/modules/network/netscaler/test_netscaler_gslb_service.py index c5497f7306..44bf299ba1 100644 --- a/test/units/modules/network/netscaler/test_netscaler_gslb_service.py +++ b/test/units/modules/network/netscaler/test_netscaler_gslb_service.py @@ -17,7 +17,7 @@ # along with Ansible. If not, see . # -from ansible.compat.tests.mock import patch, Mock, MagicMock, call +from units.compat.mock import patch, Mock, MagicMock, call from units.modules.utils import set_module_args from .netscaler_module import TestModule, nitro_base_patcher diff --git a/test/units/modules/network/netscaler/test_netscaler_gslb_site.py b/test/units/modules/network/netscaler/test_netscaler_gslb_site.py index 7f709e5cb1..a9ed138b92 100644 --- a/test/units/modules/network/netscaler/test_netscaler_gslb_site.py +++ b/test/units/modules/network/netscaler/test_netscaler_gslb_site.py @@ -17,7 +17,7 @@ # along with Ansible. If not, see . # -from ansible.compat.tests.mock import patch, Mock, MagicMock, call +from units.compat.mock import patch, Mock, MagicMock, call from units.modules.utils import set_module_args from .netscaler_module import TestModule, nitro_base_patcher diff --git a/test/units/modules/network/netscaler/test_netscaler_gslb_vserver.py b/test/units/modules/network/netscaler/test_netscaler_gslb_vserver.py index a30f559e29..acf9782eec 100644 --- a/test/units/modules/network/netscaler/test_netscaler_gslb_vserver.py +++ b/test/units/modules/network/netscaler/test_netscaler_gslb_vserver.py @@ -17,7 +17,7 @@ # along with Ansible. If not, see . # -from ansible.compat.tests.mock import patch, Mock, MagicMock, call +from units.compat.mock import patch, Mock, MagicMock, call from units.modules.utils import set_module_args from .netscaler_module import TestModule, nitro_base_patcher diff --git a/test/units/modules/network/netscaler/test_netscaler_lb_monitor.py b/test/units/modules/network/netscaler/test_netscaler_lb_monitor.py index 0162dad0cb..e405e77645 100644 --- a/test/units/modules/network/netscaler/test_netscaler_lb_monitor.py +++ b/test/units/modules/network/netscaler/test_netscaler_lb_monitor.py @@ -17,7 +17,7 @@ # along with Ansible. If not, see . # -from ansible.compat.tests.mock import patch, Mock, MagicMock, call +from units.compat.mock import patch, Mock, MagicMock, call from units.modules.utils import set_module_args from .netscaler_module import TestModule, nitro_base_patcher diff --git a/test/units/modules/network/netscaler/test_netscaler_lb_vserver.py b/test/units/modules/network/netscaler/test_netscaler_lb_vserver.py index f97ce8a66c..1f95f861bf 100644 --- a/test/units/modules/network/netscaler/test_netscaler_lb_vserver.py +++ b/test/units/modules/network/netscaler/test_netscaler_lb_vserver.py @@ -17,7 +17,7 @@ # along with Ansible. If not, see . # -from ansible.compat.tests.mock import patch, Mock, MagicMock, call +from units.compat.mock import patch, Mock, MagicMock, call from units.modules.utils import set_module_args from .netscaler_module import TestModule, nitro_base_patcher diff --git a/test/units/modules/network/netscaler/test_netscaler_module_utils.py b/test/units/modules/network/netscaler/test_netscaler_module_utils.py index 0883c6490a..44082245f7 100644 --- a/test/units/modules/network/netscaler/test_netscaler_module_utils.py +++ b/test/units/modules/network/netscaler/test_netscaler_module_utils.py @@ -17,8 +17,8 @@ # along with Ansible. If not, see . # -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import Mock +from units.compat import unittest +from units.compat.mock import Mock from ansible.module_utils.network.netscaler.netscaler import ConfigProxy, get_immutables_intersection, ensure_feature_is_enabled, log, loglines diff --git a/test/units/modules/network/netscaler/test_netscaler_nitro_request.py b/test/units/modules/network/netscaler/test_netscaler_nitro_request.py index 6506ccbcc6..addc6e11e1 100644 --- a/test/units/modules/network/netscaler/test_netscaler_nitro_request.py +++ b/test/units/modules/network/netscaler/test_netscaler_nitro_request.py @@ -17,7 +17,7 @@ # along with Ansible. If not, see . # -from ansible.compat.tests.mock import patch, Mock, call +from units.compat.mock import patch, Mock, call from .netscaler_module import TestModule import copy import tempfile diff --git a/test/units/modules/network/netscaler/test_netscaler_save_config.py b/test/units/modules/network/netscaler/test_netscaler_save_config.py index 43cafc4cf1..2f4f0e7ea1 100644 --- a/test/units/modules/network/netscaler/test_netscaler_save_config.py +++ b/test/units/modules/network/netscaler/test_netscaler_save_config.py @@ -17,7 +17,7 @@ # along with Ansible. If not, see . # -from ansible.compat.tests.mock import patch, Mock, MagicMock, call +from units.compat.mock import patch, Mock, MagicMock, call from units.modules.utils import set_module_args from .netscaler_module import TestModule, nitro_base_patcher diff --git a/test/units/modules/network/netscaler/test_netscaler_server.py b/test/units/modules/network/netscaler/test_netscaler_server.py index 21a0276722..040ffce9be 100644 --- a/test/units/modules/network/netscaler/test_netscaler_server.py +++ b/test/units/modules/network/netscaler/test_netscaler_server.py @@ -17,7 +17,7 @@ # along with Ansible. If not, see . # -from ansible.compat.tests.mock import patch, Mock, MagicMock, call +from units.compat.mock import patch, Mock, MagicMock, call from units.modules.utils import set_module_args from .netscaler_module import TestModule, nitro_base_patcher diff --git a/test/units/modules/network/netscaler/test_netscaler_service.py b/test/units/modules/network/netscaler/test_netscaler_service.py index 10c1a58e20..6d7fa95335 100644 --- a/test/units/modules/network/netscaler/test_netscaler_service.py +++ b/test/units/modules/network/netscaler/test_netscaler_service.py @@ -17,7 +17,7 @@ # along with Ansible. If not, see . # -from ansible.compat.tests.mock import patch, Mock, MagicMock, call +from units.compat.mock import patch, Mock, MagicMock, call import sys diff --git a/test/units/modules/network/netscaler/test_netscaler_servicegroup.py b/test/units/modules/network/netscaler/test_netscaler_servicegroup.py index dd5ebe4450..b9729c4546 100644 --- a/test/units/modules/network/netscaler/test_netscaler_servicegroup.py +++ b/test/units/modules/network/netscaler/test_netscaler_servicegroup.py @@ -17,7 +17,7 @@ # along with Ansible. If not, see . # -from ansible.compat.tests.mock import patch, Mock, MagicMock, call +from units.compat.mock import patch, Mock, MagicMock, call import sys diff --git a/test/units/modules/network/netscaler/test_netscaler_ssl_certkey.py b/test/units/modules/network/netscaler/test_netscaler_ssl_certkey.py index d4b1ae5491..da751aac34 100644 --- a/test/units/modules/network/netscaler/test_netscaler_ssl_certkey.py +++ b/test/units/modules/network/netscaler/test_netscaler_ssl_certkey.py @@ -17,7 +17,7 @@ # along with Ansible. If not, see . # -from ansible.compat.tests.mock import patch, Mock, MagicMock, call +from units.compat.mock import patch, Mock, MagicMock, call from units.modules.utils import set_module_args from .netscaler_module import TestModule, nitro_base_patcher diff --git a/test/units/modules/network/nos/test_nos_command.py b/test/units/modules/network/nos/test_nos_command.py index 1838d85d86..df893414be 100644 --- a/test/units/modules/network/nos/test_nos_command.py +++ b/test/units/modules/network/nos/test_nos_command.py @@ -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.nos import nos_command from units.modules.utils import set_module_args from .nos_module import TestNosModule, load_fixture diff --git a/test/units/modules/network/nos/test_nos_config.py b/test/units/modules/network/nos/test_nos_config.py index a71c38316a..9361afd557 100644 --- a/test/units/modules/network/nos/test_nos_config.py +++ b/test/units/modules/network/nos/test_nos_config.py @@ -19,7 +19,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.nos import nos_config from units.modules.utils import set_module_args from .nos_module import TestNosModule, load_fixture diff --git a/test/units/modules/network/nos/test_nos_facts.py b/test/units/modules/network/nos/test_nos_facts.py index 28b0eca65c..7582a76115 100644 --- a/test/units/modules/network/nos/test_nos_facts.py +++ b/test/units/modules/network/nos/test_nos_facts.py @@ -19,7 +19,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.nos import nos_facts from units.modules.utils import set_module_args from .nos_module import TestNosModule, load_fixture diff --git a/test/units/modules/network/nso/nso_module.py b/test/units/modules/network/nso/nso_module.py index 8df42fe996..4b61cb731a 100644 --- a/test/units/modules/network/nso/nso_module.py +++ b/test/units/modules/network/nso/nso_module.py @@ -20,8 +20,8 @@ from __future__ import (absolute_import, division, print_function) import os import json -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 diff --git a/test/units/modules/network/nso/test_nso_action.py b/test/units/modules/network/nso/test_nso_action.py index 661ad3a869..7af5ace55e 100644 --- a/test/units/modules/network/nso/test_nso_action.py +++ b/test/units/modules/network/nso/test_nso_action.py @@ -20,7 +20,7 @@ from __future__ import (absolute_import, division, print_function) import json -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.modules.network.nso import nso_action from . import nso_module from .nso_module import MockResponse diff --git a/test/units/modules/network/nso/test_nso_config.py b/test/units/modules/network/nso/test_nso_config.py index d4b9e551c1..19bfb5eda0 100644 --- a/test/units/modules/network/nso/test_nso_config.py +++ b/test/units/modules/network/nso/test_nso_config.py @@ -20,7 +20,7 @@ from __future__ import (absolute_import, division, print_function) import json -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.modules.network.nso import nso_config from units.modules.utils import set_module_args, AnsibleFailJson from . import nso_module diff --git a/test/units/modules/network/nso/test_nso_query.py b/test/units/modules/network/nso/test_nso_query.py index 40060fe233..c3be7c04d0 100644 --- a/test/units/modules/network/nso/test_nso_query.py +++ b/test/units/modules/network/nso/test_nso_query.py @@ -18,7 +18,7 @@ from __future__ import (absolute_import, division, print_function) -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.modules.network.nso import nso_query from . import nso_module from .nso_module import MockResponse diff --git a/test/units/modules/network/nso/test_nso_show.py b/test/units/modules/network/nso/test_nso_show.py index 3d63716ccb..fa33f2fbf8 100644 --- a/test/units/modules/network/nso/test_nso_show.py +++ b/test/units/modules/network/nso/test_nso_show.py @@ -20,7 +20,7 @@ from __future__ import (absolute_import, division, print_function) import json -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.modules.network.nso import nso_show from . import nso_module from .nso_module import MockResponse diff --git a/test/units/modules/network/nso/test_nso_verify.py b/test/units/modules/network/nso/test_nso_verify.py index ac746b4a1f..4a4a366a89 100644 --- a/test/units/modules/network/nso/test_nso_verify.py +++ b/test/units/modules/network/nso/test_nso_verify.py @@ -20,7 +20,7 @@ from __future__ import (absolute_import, division, print_function) import json -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.modules.network.nso import nso_verify from . import nso_module from .nso_module import MockResponse diff --git a/test/units/modules/network/nuage/nuage_module.py b/test/units/modules/network/nuage/nuage_module.py index c27b5d3e8f..cae2a50500 100644 --- a/test/units/modules/network/nuage/nuage_module.py +++ b/test/units/modules/network/nuage/nuage_module.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from units.modules.utils import set_module_args as _set_module_args, AnsibleExitJson, AnsibleFailJson, ModuleTestCase from nose.plugins.skip import SkipTest diff --git a/test/units/modules/network/nuage/test_nuage_vspk.py b/test/units/modules/network/nuage/test_nuage_vspk.py index f4278768f9..27c3618f34 100644 --- a/test/units/modules/network/nuage/test_nuage_vspk.py +++ b/test/units/modules/network/nuage/test_nuage_vspk.py @@ -29,7 +29,7 @@ try: except ImportError: raise SkipTest('Nuage Ansible modules requires the vspk and bambou python libraries') -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from units.modules.utils import set_module_args, AnsibleExitJson, AnsibleFailJson from .nuage_module import MockNuageConnection, TestNuageModule diff --git a/test/units/modules/network/nxos/test_nxos_acl.py b/test/units/modules/network/nxos/test_nxos_acl.py index e18a83d8f3..39fb0b0486 100644 --- a/test/units/modules/network/nxos/test_nxos_acl.py +++ b/test/units/modules/network/nxos/test_nxos_acl.py @@ -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.nxos import nxos_acl from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_acl_interface.py b/test/units/modules/network/nxos/test_nxos_acl_interface.py index 8e71fa8c86..bfcab65a94 100644 --- a/test/units/modules/network/nxos/test_nxos_acl_interface.py +++ b/test/units/modules/network/nxos/test_nxos_acl_interface.py @@ -19,7 +19,7 @@ from __future__ import (absolute_import, division, print_function) __metacl_interfaceass__ = type -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.modules.network.nxos import nxos_acl_interface from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_banner.py b/test/units/modules/network/nxos/test_nxos_banner.py index 7c0644a38e..326f9a3088 100644 --- a/test/units/modules/network/nxos/test_nxos_banner.py +++ b/test/units/modules/network/nxos/test_nxos_banner.py @@ -17,7 +17,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.nxos import nxos_banner from .nxos_module import TestNxosModule, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_bgp.py b/test/units/modules/network/nxos/test_nxos_bgp.py index cc71c877aa..cc3ae8c890 100644 --- a/test/units/modules/network/nxos/test_nxos_bgp.py +++ b/test/units/modules/network/nxos/test_nxos_bgp.py @@ -19,7 +19,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.nxos import nxos_bgp from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_bgp_af.py b/test/units/modules/network/nxos/test_nxos_bgp_af.py index b508047e82..c0cc93d282 100644 --- a/test/units/modules/network/nxos/test_nxos_bgp_af.py +++ b/test/units/modules/network/nxos/test_nxos_bgp_af.py @@ -19,7 +19,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.nxos import nxos_bgp_af from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_bgp_neighbor.py b/test/units/modules/network/nxos/test_nxos_bgp_neighbor.py index e18d9581e6..ac05f6120f 100644 --- a/test/units/modules/network/nxos/test_nxos_bgp_neighbor.py +++ b/test/units/modules/network/nxos/test_nxos_bgp_neighbor.py @@ -19,7 +19,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.nxos import nxos_bgp_neighbor from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_bgp_neighbor_af.py b/test/units/modules/network/nxos/test_nxos_bgp_neighbor_af.py index ed0617a568..78cb1e3307 100644 --- a/test/units/modules/network/nxos/test_nxos_bgp_neighbor_af.py +++ b/test/units/modules/network/nxos/test_nxos_bgp_neighbor_af.py @@ -19,7 +19,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.nxos import nxos_bgp_neighbor_af from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_command.py b/test/units/modules/network/nxos/test_nxos_command.py index 6f3e0e14c3..a3c148212a 100644 --- a/test/units/modules/network/nxos/test_nxos_command.py +++ b/test/units/modules/network/nxos/test_nxos_command.py @@ -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.nxos import nxos_command from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_config.py b/test/units/modules/network/nxos/test_nxos_config.py index de476734a4..bff8cc6d7e 100644 --- a/test/units/modules/network/nxos/test_nxos_config.py +++ b/test/units/modules/network/nxos/test_nxos_config.py @@ -19,7 +19,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible.compat.tests.mock import patch, MagicMock +from units.compat.mock import patch, MagicMock from ansible.modules.network.nxos import nxos_config from ansible.plugins.cliconf.nxos import Cliconf from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_evpn_global.py b/test/units/modules/network/nxos/test_nxos_evpn_global.py index ddef388ed5..f83e242d20 100644 --- a/test/units/modules/network/nxos/test_nxos_evpn_global.py +++ b/test/units/modules/network/nxos/test_nxos_evpn_global.py @@ -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.nxos import nxos_evpn_global from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_evpn_vni.py b/test/units/modules/network/nxos/test_nxos_evpn_vni.py index db5c37a1c0..67dda12432 100644 --- a/test/units/modules/network/nxos/test_nxos_evpn_vni.py +++ b/test/units/modules/network/nxos/test_nxos_evpn_vni.py @@ -19,7 +19,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.nxos import nxos_evpn_vni from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_feature.py b/test/units/modules/network/nxos/test_nxos_feature.py index 3c824b9477..d0ca483410 100644 --- a/test/units/modules/network/nxos/test_nxos_feature.py +++ b/test/units/modules/network/nxos/test_nxos_feature.py @@ -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.nxos import nxos_feature from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_hsrp.py b/test/units/modules/network/nxos/test_nxos_hsrp.py index 4bf53f2423..2cb84a224d 100644 --- a/test/units/modules/network/nxos/test_nxos_hsrp.py +++ b/test/units/modules/network/nxos/test_nxos_hsrp.py @@ -19,7 +19,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.nxos import nxos_hsrp from .nxos_module import TestNxosModule, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_interface.py b/test/units/modules/network/nxos/test_nxos_interface.py index 52752d62b0..7660642fc8 100644 --- a/test/units/modules/network/nxos/test_nxos_interface.py +++ b/test/units/modules/network/nxos/test_nxos_interface.py @@ -19,7 +19,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.nxos import nxos_interface from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_interface_ospf.py b/test/units/modules/network/nxos/test_nxos_interface_ospf.py index 525d88e267..64258d330d 100644 --- a/test/units/modules/network/nxos/test_nxos_interface_ospf.py +++ b/test/units/modules/network/nxos/test_nxos_interface_ospf.py @@ -19,7 +19,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.nxos import nxos_interface_ospf from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_ip_interface.py b/test/units/modules/network/nxos/test_nxos_ip_interface.py index 5b84dc6350..2585b6a43b 100644 --- a/test/units/modules/network/nxos/test_nxos_ip_interface.py +++ b/test/units/modules/network/nxos/test_nxos_ip_interface.py @@ -19,7 +19,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.nxos import _nxos_ip_interface from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_nxapi.py b/test/units/modules/network/nxos/test_nxos_nxapi.py index 405272fdc2..c0eae1a341 100644 --- a/test/units/modules/network/nxos/test_nxos_nxapi.py +++ b/test/units/modules/network/nxos/test_nxos_nxapi.py @@ -19,7 +19,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.nxos import nxos_nxapi from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_ospf.py b/test/units/modules/network/nxos/test_nxos_ospf.py index 38374e8e70..13a8a965ca 100644 --- a/test/units/modules/network/nxos/test_nxos_ospf.py +++ b/test/units/modules/network/nxos/test_nxos_ospf.py @@ -19,7 +19,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.nxos import nxos_ospf from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_ospf_vrf.py b/test/units/modules/network/nxos/test_nxos_ospf_vrf.py index 2258d9c67d..d907488b2c 100644 --- a/test/units/modules/network/nxos/test_nxos_ospf_vrf.py +++ b/test/units/modules/network/nxos/test_nxos_ospf_vrf.py @@ -19,7 +19,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.nxos import nxos_ospf_vrf from .nxos_module import TestNxosModule, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_overlay_global.py b/test/units/modules/network/nxos/test_nxos_overlay_global.py index c4ef81d74c..ffbfe73e8d 100644 --- a/test/units/modules/network/nxos/test_nxos_overlay_global.py +++ b/test/units/modules/network/nxos/test_nxos_overlay_global.py @@ -19,7 +19,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.nxos import nxos_overlay_global from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_pim.py b/test/units/modules/network/nxos/test_nxos_pim.py index 52bf64c7d8..da6c1b1043 100644 --- a/test/units/modules/network/nxos/test_nxos_pim.py +++ b/test/units/modules/network/nxos/test_nxos_pim.py @@ -19,7 +19,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.nxos import nxos_pim from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_pim_interface.py b/test/units/modules/network/nxos/test_nxos_pim_interface.py index 70d35fd0c9..41bab3d8cd 100644 --- a/test/units/modules/network/nxos/test_nxos_pim_interface.py +++ b/test/units/modules/network/nxos/test_nxos_pim_interface.py @@ -19,7 +19,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.nxos import nxos_pim_interface from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_pim_rp_address.py b/test/units/modules/network/nxos/test_nxos_pim_rp_address.py index 608bf06ef3..f6e8919daf 100644 --- a/test/units/modules/network/nxos/test_nxos_pim_rp_address.py +++ b/test/units/modules/network/nxos/test_nxos_pim_rp_address.py @@ -19,7 +19,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.nxos import nxos_pim_rp_address from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_portchannel.py b/test/units/modules/network/nxos/test_nxos_portchannel.py index 919b2e8473..df23856f62 100644 --- a/test/units/modules/network/nxos/test_nxos_portchannel.py +++ b/test/units/modules/network/nxos/test_nxos_portchannel.py @@ -19,7 +19,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.nxos import _nxos_portchannel from .nxos_module import TestNxosModule, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_static_route.py b/test/units/modules/network/nxos/test_nxos_static_route.py index 2e04a6aefb..cb9d13cc1a 100644 --- a/test/units/modules/network/nxos/test_nxos_static_route.py +++ b/test/units/modules/network/nxos/test_nxos_static_route.py @@ -19,7 +19,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.nxos import nxos_static_route from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_switchport.py b/test/units/modules/network/nxos/test_nxos_switchport.py index 26dc5d990a..89463f41d1 100644 --- a/test/units/modules/network/nxos/test_nxos_switchport.py +++ b/test/units/modules/network/nxos/test_nxos_switchport.py @@ -19,7 +19,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.nxos import _nxos_switchport from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_system.py b/test/units/modules/network/nxos/test_nxos_system.py index 44a1b20f50..6f38dd3893 100644 --- a/test/units/modules/network/nxos/test_nxos_system.py +++ b/test/units/modules/network/nxos/test_nxos_system.py @@ -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.nxos import nxos_system from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_vlan.py b/test/units/modules/network/nxos/test_nxos_vlan.py index dcc9f131b5..1f0b546b68 100644 --- a/test/units/modules/network/nxos/test_nxos_vlan.py +++ b/test/units/modules/network/nxos/test_nxos_vlan.py @@ -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.nxos import nxos_vlan from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_vpc.py b/test/units/modules/network/nxos/test_nxos_vpc.py index 088bcaf9e4..d20620b9c4 100644 --- a/test/units/modules/network/nxos/test_nxos_vpc.py +++ b/test/units/modules/network/nxos/test_nxos_vpc.py @@ -19,7 +19,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.nxos import nxos_vpc from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_vpc_interface.py b/test/units/modules/network/nxos/test_nxos_vpc_interface.py index 5c85e01909..d61dbbfc4f 100644 --- a/test/units/modules/network/nxos/test_nxos_vpc_interface.py +++ b/test/units/modules/network/nxos/test_nxos_vpc_interface.py @@ -19,7 +19,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.nxos import nxos_vpc_interface from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_vrf.py b/test/units/modules/network/nxos/test_nxos_vrf.py index 7518838cc2..6479a9f2ba 100644 --- a/test/units/modules/network/nxos/test_nxos_vrf.py +++ b/test/units/modules/network/nxos/test_nxos_vrf.py @@ -19,7 +19,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.nxos import nxos_vrf from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_vrf_af.py b/test/units/modules/network/nxos/test_nxos_vrf_af.py index 834f75c0f3..a5eaace5f5 100644 --- a/test/units/modules/network/nxos/test_nxos_vrf_af.py +++ b/test/units/modules/network/nxos/test_nxos_vrf_af.py @@ -19,7 +19,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.nxos import nxos_vrf_af from .nxos_module import TestNxosModule, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_vxlan_vtep.py b/test/units/modules/network/nxos/test_nxos_vxlan_vtep.py index 7b925c4653..f136986753 100644 --- a/test/units/modules/network/nxos/test_nxos_vxlan_vtep.py +++ b/test/units/modules/network/nxos/test_nxos_vxlan_vtep.py @@ -19,7 +19,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.nxos import nxos_vxlan_vtep from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/nxos/test_nxos_vxlan_vtep_vni.py b/test/units/modules/network/nxos/test_nxos_vxlan_vtep_vni.py index ca445e40b1..798dd7ae05 100644 --- a/test/units/modules/network/nxos/test_nxos_vxlan_vtep_vni.py +++ b/test/units/modules/network/nxos/test_nxos_vxlan_vtep_vni.py @@ -19,7 +19,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.nxos import nxos_vxlan_vtep_vni from .nxos_module import TestNxosModule, load_fixture, set_module_args diff --git a/test/units/modules/network/onyx/test_onyx_bgp.py b/test/units/modules/network/onyx/test_onyx_bgp.py index e110584f69..75c7864de4 100644 --- a/test/units/modules/network/onyx/test_onyx_bgp.py +++ b/test/units/modules/network/onyx/test_onyx_bgp.py @@ -6,7 +6,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.onyx import onyx_bgp from units.modules.utils import set_module_args from .onyx_module import TestOnyxModule, load_fixture diff --git a/test/units/modules/network/onyx/test_onyx_command.py b/test/units/modules/network/onyx/test_onyx_command.py index e3d88effb0..f7825cc528 100644 --- a/test/units/modules/network/onyx/test_onyx_command.py +++ b/test/units/modules/network/onyx/test_onyx_command.py @@ -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.onyx import onyx_command from units.modules.utils import set_module_args from .onyx_module import TestOnyxModule, load_fixture diff --git a/test/units/modules/network/onyx/test_onyx_config.py b/test/units/modules/network/onyx/test_onyx_config.py index 018b01b3de..3bdb980c47 100644 --- a/test/units/modules/network/onyx/test_onyx_config.py +++ b/test/units/modules/network/onyx/test_onyx_config.py @@ -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.onyx import onyx_config from units.modules.utils import set_module_args from .onyx_module import TestOnyxModule, load_fixture diff --git a/test/units/modules/network/onyx/test_onyx_facts.py b/test/units/modules/network/onyx/test_onyx_facts.py index 7a9c1a13c8..4195e290e0 100644 --- a/test/units/modules/network/onyx/test_onyx_facts.py +++ b/test/units/modules/network/onyx/test_onyx_facts.py @@ -6,7 +6,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 units.modules.utils import set_module_args from .onyx_module import TestOnyxModule, load_fixture from ansible.modules.network.onyx import onyx_facts diff --git a/test/units/modules/network/onyx/test_onyx_igmp.py b/test/units/modules/network/onyx/test_onyx_igmp.py index bc86ba8474..8172eadb18 100644 --- a/test/units/modules/network/onyx/test_onyx_igmp.py +++ b/test/units/modules/network/onyx/test_onyx_igmp.py @@ -6,7 +6,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.onyx import onyx_igmp from units.modules.utils import set_module_args from .onyx_module import TestOnyxModule, load_fixture diff --git a/test/units/modules/network/onyx/test_onyx_igmp_interface.py b/test/units/modules/network/onyx/test_onyx_igmp_interface.py index e8f4373ffb..35f84045b5 100644 --- a/test/units/modules/network/onyx/test_onyx_igmp_interface.py +++ b/test/units/modules/network/onyx/test_onyx_igmp_interface.py @@ -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.onyx import onyx_igmp_interface from units.modules.utils import set_module_args from .onyx_module import TestOnyxModule, load_fixture diff --git a/test/units/modules/network/onyx/test_onyx_interface.py b/test/units/modules/network/onyx/test_onyx_interface.py index 8583e24f31..3eb06318c4 100644 --- a/test/units/modules/network/onyx/test_onyx_interface.py +++ b/test/units/modules/network/onyx/test_onyx_interface.py @@ -6,7 +6,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.onyx import onyx_interface from units.modules.utils import set_module_args from .onyx_module import TestOnyxModule, load_fixture diff --git a/test/units/modules/network/onyx/test_onyx_l2_interface.py b/test/units/modules/network/onyx/test_onyx_l2_interface.py index e05673721e..7efc6b16e3 100644 --- a/test/units/modules/network/onyx/test_onyx_l2_interface.py +++ b/test/units/modules/network/onyx/test_onyx_l2_interface.py @@ -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.onyx import onyx_l2_interface from units.modules.utils import set_module_args from .onyx_module import TestOnyxModule, load_fixture diff --git a/test/units/modules/network/onyx/test_onyx_l3_interface.py b/test/units/modules/network/onyx/test_onyx_l3_interface.py index 7926b407f1..0fa21aab12 100644 --- a/test/units/modules/network/onyx/test_onyx_l3_interface.py +++ b/test/units/modules/network/onyx/test_onyx_l3_interface.py @@ -6,7 +6,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.onyx import onyx_l3_interface from units.modules.utils import set_module_args from .onyx_module import TestOnyxModule, load_fixture diff --git a/test/units/modules/network/onyx/test_onyx_linkagg.py b/test/units/modules/network/onyx/test_onyx_linkagg.py index ba7f970302..4d9c8b1642 100644 --- a/test/units/modules/network/onyx/test_onyx_linkagg.py +++ b/test/units/modules/network/onyx/test_onyx_linkagg.py @@ -6,7 +6,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.onyx import onyx_linkagg from units.modules.utils import set_module_args from .onyx_module import TestOnyxModule, load_fixture diff --git a/test/units/modules/network/onyx/test_onyx_lldp.py b/test/units/modules/network/onyx/test_onyx_lldp.py index 69084176fe..3388c5234b 100644 --- a/test/units/modules/network/onyx/test_onyx_lldp.py +++ b/test/units/modules/network/onyx/test_onyx_lldp.py @@ -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.onyx import onyx_lldp from units.modules.utils import set_module_args from .onyx_module import TestOnyxModule, load_fixture diff --git a/test/units/modules/network/onyx/test_onyx_lldp_interface.py b/test/units/modules/network/onyx/test_onyx_lldp_interface.py index 4cbf9f4bbc..223b0c6be8 100644 --- a/test/units/modules/network/onyx/test_onyx_lldp_interface.py +++ b/test/units/modules/network/onyx/test_onyx_lldp_interface.py @@ -6,7 +6,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.onyx import onyx_lldp_interface from units.modules.utils import set_module_args from .onyx_module import TestOnyxModule, load_fixture diff --git a/test/units/modules/network/onyx/test_onyx_magp.py b/test/units/modules/network/onyx/test_onyx_magp.py index d63a377005..8a5146b6b8 100644 --- a/test/units/modules/network/onyx/test_onyx_magp.py +++ b/test/units/modules/network/onyx/test_onyx_magp.py @@ -6,7 +6,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.onyx import onyx_magp from units.modules.utils import set_module_args from .onyx_module import TestOnyxModule, load_fixture diff --git a/test/units/modules/network/onyx/test_onyx_mlag_ipl.py b/test/units/modules/network/onyx/test_onyx_mlag_ipl.py index 2a88644ffc..126f82e32f 100644 --- a/test/units/modules/network/onyx/test_onyx_mlag_ipl.py +++ b/test/units/modules/network/onyx/test_onyx_mlag_ipl.py @@ -6,7 +6,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.onyx import onyx_mlag_ipl from units.modules.utils import set_module_args from .onyx_module import TestOnyxModule, load_fixture diff --git a/test/units/modules/network/onyx/test_onyx_mlag_vip.py b/test/units/modules/network/onyx/test_onyx_mlag_vip.py index 87acff617f..f093c9a5ca 100644 --- a/test/units/modules/network/onyx/test_onyx_mlag_vip.py +++ b/test/units/modules/network/onyx/test_onyx_mlag_vip.py @@ -6,7 +6,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.onyx import onyx_mlag_vip from units.modules.utils import set_module_args from .onyx_module import TestOnyxModule, load_fixture diff --git a/test/units/modules/network/onyx/test_onyx_ospf.py b/test/units/modules/network/onyx/test_onyx_ospf.py index f50f41c472..76c7f4332c 100644 --- a/test/units/modules/network/onyx/test_onyx_ospf.py +++ b/test/units/modules/network/onyx/test_onyx_ospf.py @@ -6,7 +6,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.onyx import onyx_ospf from units.modules.utils import set_module_args from .onyx_module import TestOnyxModule, load_fixture diff --git a/test/units/modules/network/onyx/test_onyx_pfc_interface.py b/test/units/modules/network/onyx/test_onyx_pfc_interface.py index 25c456d69b..9f70f31ff4 100644 --- a/test/units/modules/network/onyx/test_onyx_pfc_interface.py +++ b/test/units/modules/network/onyx/test_onyx_pfc_interface.py @@ -6,7 +6,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.onyx import onyx_pfc_interface from units.modules.utils import set_module_args from .onyx_module import TestOnyxModule, load_fixture diff --git a/test/units/modules/network/onyx/test_onyx_protocols.py b/test/units/modules/network/onyx/test_onyx_protocols.py index cc873eead1..2353a40632 100644 --- a/test/units/modules/network/onyx/test_onyx_protocols.py +++ b/test/units/modules/network/onyx/test_onyx_protocols.py @@ -6,7 +6,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.onyx import onyx_protocol from units.modules.utils import set_module_args from .onyx_module import TestOnyxModule, load_fixture diff --git a/test/units/modules/network/onyx/test_onyx_vlan.py b/test/units/modules/network/onyx/test_onyx_vlan.py index f6c5889125..9697444854 100644 --- a/test/units/modules/network/onyx/test_onyx_vlan.py +++ b/test/units/modules/network/onyx/test_onyx_vlan.py @@ -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.onyx import onyx_vlan from units.modules.utils import set_module_args from .onyx_module import TestOnyxModule, load_fixture diff --git a/test/units/modules/network/opx/test_opx_cps.py b/test/units/modules/network/opx/test_opx_cps.py index 3b3cacb110..6fb58e7f8b 100644 --- a/test/units/modules/network/opx/test_opx_cps.py +++ b/test/units/modules/network/opx/test_opx_cps.py @@ -22,7 +22,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible.compat.tests.mock import patch, Mock, MagicMock +from units.compat.mock import patch, Mock, MagicMock import sys sys.modules['cps'] = Mock(QUALIFIERS=[ "target", diff --git a/test/units/modules/network/ovs/test_openvswitch_bridge.py b/test/units/modules/network/ovs/test_openvswitch_bridge.py index 0e39572bc6..2bd52b529d 100644 --- a/test/units/modules/network/ovs/test_openvswitch_bridge.py +++ b/test/units/modules/network/ovs/test_openvswitch_bridge.py @@ -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.ovs import openvswitch_bridge from units.modules.utils import set_module_args from .ovs_module import TestOpenVSwitchModule, load_fixture diff --git a/test/units/modules/network/ovs/test_openvswitch_db.py b/test/units/modules/network/ovs/test_openvswitch_db.py index 87a883b89e..99262b4ffb 100644 --- a/test/units/modules/network/ovs/test_openvswitch_db.py +++ b/test/units/modules/network/ovs/test_openvswitch_db.py @@ -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.ovs import openvswitch_db from units.modules.utils import set_module_args from .ovs_module import TestOpenVSwitchModule, load_fixture diff --git a/test/units/modules/network/ovs/test_openvswitch_port.py b/test/units/modules/network/ovs/test_openvswitch_port.py index d9fc55e691..1c2ebb9b19 100644 --- a/test/units/modules/network/ovs/test_openvswitch_port.py +++ b/test/units/modules/network/ovs/test_openvswitch_port.py @@ -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.ovs import openvswitch_port from units.modules.utils import set_module_args from .ovs_module import TestOpenVSwitchModule, load_fixture diff --git a/test/units/modules/network/radware/test_vdirect_commit.py b/test/units/modules/network/radware/test_vdirect_commit.py index cbd8f551bf..030e004cd0 100644 --- a/test/units/modules/network/radware/test_vdirect_commit.py +++ b/test/units/modules/network/radware/test_vdirect_commit.py @@ -18,10 +18,10 @@ # along with Ansible. If not, see . import os -from ansible.compat.tests.mock import patch, MagicMock +from units.compat.mock import patch, MagicMock -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import patch BASE_PARAMS = {'vdirect_ip': None, 'vdirect_user': None, 'vdirect_password': None, 'vdirect_wait': None, 'vdirect_secondary_ip': None, diff --git a/test/units/modules/network/radware/test_vdirect_file.py b/test/units/modules/network/radware/test_vdirect_file.py index 5d753ac9e6..1c244bfd2c 100644 --- a/test/units/modules/network/radware/test_vdirect_file.py +++ b/test/units/modules/network/radware/test_vdirect_file.py @@ -20,8 +20,8 @@ import os from mock import patch, MagicMock -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import patch RESP_STATUS = 0 RESP_REASON = 1 diff --git a/test/units/modules/network/radware/test_vdirect_runnable.py b/test/units/modules/network/radware/test_vdirect_runnable.py index ff389f8114..62b8ba7994 100644 --- a/test/units/modules/network/radware/test_vdirect_runnable.py +++ b/test/units/modules/network/radware/test_vdirect_runnable.py @@ -18,10 +18,10 @@ # along with Ansible. If not, see . import os -from ansible.compat.tests.mock import patch, MagicMock +from units.compat.mock import patch, MagicMock -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import patch +from units.compat import unittest +from units.compat.mock import patch BASE_PARAMS = {'vdirect_ip': None, 'vdirect_user': None, 'vdirect_password': None, 'vdirect_wait': None, 'vdirect_secondary_ip': None, diff --git a/test/units/modules/network/routeros/test_routeros_command.py b/test/units/modules/network/routeros/test_routeros_command.py index 79c12e6092..7503e78c7b 100644 --- a/test/units/modules/network/routeros/test_routeros_command.py +++ b/test/units/modules/network/routeros/test_routeros_command.py @@ -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.routeros import routeros_command from units.modules.utils import set_module_args from .routeros_module import TestRouterosModule, load_fixture diff --git a/test/units/modules/network/routeros/test_routeros_facts.py b/test/units/modules/network/routeros/test_routeros_facts.py index b8d40e712e..3eedbdd8d9 100644 --- a/test/units/modules/network/routeros/test_routeros_facts.py +++ b/test/units/modules/network/routeros/test_routeros_facts.py @@ -17,7 +17,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.routeros import routeros_facts from units.modules.utils import set_module_args from .routeros_module import TestRouterosModule, load_fixture diff --git a/test/units/modules/network/slxos/test_slxos_command.py b/test/units/modules/network/slxos/test_slxos_command.py index 841754cb2f..4be07ef733 100644 --- a/test/units/modules/network/slxos/test_slxos_command.py +++ b/test/units/modules/network/slxos/test_slxos_command.py @@ -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.slxos import slxos_command from units.modules.utils import set_module_args from .slxos_module import TestSlxosModule, load_fixture diff --git a/test/units/modules/network/slxos/test_slxos_config.py b/test/units/modules/network/slxos/test_slxos_config.py index 8302495512..c4824de85b 100644 --- a/test/units/modules/network/slxos/test_slxos_config.py +++ b/test/units/modules/network/slxos/test_slxos_config.py @@ -19,7 +19,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.slxos import slxos_config from units.modules.utils import set_module_args from .slxos_module import TestSlxosModule, load_fixture diff --git a/test/units/modules/network/slxos/test_slxos_facts.py b/test/units/modules/network/slxos/test_slxos_facts.py index 50adab697c..dcc5900333 100644 --- a/test/units/modules/network/slxos/test_slxos_facts.py +++ b/test/units/modules/network/slxos/test_slxos_facts.py @@ -19,7 +19,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.slxos import slxos_facts from units.modules.utils import set_module_args from .slxos_module import TestSlxosModule, load_fixture diff --git a/test/units/modules/network/slxos/test_slxos_interface.py b/test/units/modules/network/slxos/test_slxos_interface.py index 01a8081657..ab54bfc61c 100644 --- a/test/units/modules/network/slxos/test_slxos_interface.py +++ b/test/units/modules/network/slxos/test_slxos_interface.py @@ -22,7 +22,7 @@ __metaclass__ = type import re import json -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.modules.network.slxos import slxos_interface from units.modules.utils import set_module_args from .slxos_module import TestSlxosModule, load_fixture diff --git a/test/units/modules/network/slxos/test_slxos_l2_interface.py b/test/units/modules/network/slxos/test_slxos_l2_interface.py index e899ca5352..66aa7c46df 100644 --- a/test/units/modules/network/slxos/test_slxos_l2_interface.py +++ b/test/units/modules/network/slxos/test_slxos_l2_interface.py @@ -22,7 +22,7 @@ __metaclass__ = type import re import json -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.modules.network.slxos import slxos_l2_interface from units.modules.utils import set_module_args from .slxos_module import TestSlxosModule, load_fixture diff --git a/test/units/modules/network/slxos/test_slxos_l3_interface.py b/test/units/modules/network/slxos/test_slxos_l3_interface.py index a219dbebc1..8ff4f1e77d 100644 --- a/test/units/modules/network/slxos/test_slxos_l3_interface.py +++ b/test/units/modules/network/slxos/test_slxos_l3_interface.py @@ -22,7 +22,7 @@ __metaclass__ = type import re import json -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.modules.network.slxos import slxos_l3_interface from units.modules.utils import set_module_args from .slxos_module import TestSlxosModule, load_fixture diff --git a/test/units/modules/network/slxos/test_slxos_linkagg.py b/test/units/modules/network/slxos/test_slxos_linkagg.py index 166135eccb..70f9d68870 100644 --- a/test/units/modules/network/slxos/test_slxos_linkagg.py +++ b/test/units/modules/network/slxos/test_slxos_linkagg.py @@ -22,7 +22,7 @@ __metaclass__ = type import re import json -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.modules.network.slxos import slxos_linkagg from units.modules.utils import set_module_args from .slxos_module import TestSlxosModule, load_fixture diff --git a/test/units/modules/network/slxos/test_slxos_lldp.py b/test/units/modules/network/slxos/test_slxos_lldp.py index cfed5d65b9..65e12115d4 100644 --- a/test/units/modules/network/slxos/test_slxos_lldp.py +++ b/test/units/modules/network/slxos/test_slxos_lldp.py @@ -22,7 +22,7 @@ __metaclass__ = type import re import json -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.modules.network.slxos import slxos_lldp from units.modules.utils import set_module_args from .slxos_module import TestSlxosModule, load_fixture diff --git a/test/units/modules/network/slxos/test_slxos_vlan.py b/test/units/modules/network/slxos/test_slxos_vlan.py index 38002a4594..76d466cfd2 100644 --- a/test/units/modules/network/slxos/test_slxos_vlan.py +++ b/test/units/modules/network/slxos/test_slxos_vlan.py @@ -22,7 +22,7 @@ __metaclass__ = type import re import json -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.modules.network.slxos import slxos_vlan from units.modules.utils import set_module_args from .slxos_module import TestSlxosModule, load_fixture diff --git a/test/units/modules/network/voss/test_voss_command.py b/test/units/modules/network/voss/test_voss_command.py index 69e3724130..424aecd39e 100644 --- a/test/units/modules/network/voss/test_voss_command.py +++ b/test/units/modules/network/voss/test_voss_command.py @@ -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.voss import voss_command from units.modules.utils import set_module_args from .voss_module import TestVossModule, load_fixture diff --git a/test/units/modules/network/voss/test_voss_facts.py b/test/units/modules/network/voss/test_voss_facts.py index 081ff7f296..6a08f40764 100644 --- a/test/units/modules/network/voss/test_voss_facts.py +++ b/test/units/modules/network/voss/test_voss_facts.py @@ -17,7 +17,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.voss import voss_facts from units.modules.utils import set_module_args from .voss_module import TestVossModule, load_fixture diff --git a/test/units/modules/network/vyos/test_vyos_banner.py b/test/units/modules/network/vyos/test_vyos_banner.py index 57c6f66122..9e20f51b92 100644 --- a/test/units/modules/network/vyos/test_vyos_banner.py +++ b/test/units/modules/network/vyos/test_vyos_banner.py @@ -17,7 +17,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.vyos import vyos_banner from units.modules.utils import set_module_args from .vyos_module import TestVyosModule, load_fixture diff --git a/test/units/modules/network/vyos/test_vyos_command.py b/test/units/modules/network/vyos/test_vyos_command.py index 4ba25e93ea..63e5d6b3b9 100644 --- a/test/units/modules/network/vyos/test_vyos_command.py +++ b/test/units/modules/network/vyos/test_vyos_command.py @@ -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.vyos import vyos_command from units.modules.utils import set_module_args from .vyos_module import TestVyosModule, load_fixture diff --git a/test/units/modules/network/vyos/test_vyos_config.py b/test/units/modules/network/vyos/test_vyos_config.py index c4cc347138..015ec8807f 100644 --- a/test/units/modules/network/vyos/test_vyos_config.py +++ b/test/units/modules/network/vyos/test_vyos_config.py @@ -20,7 +20,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible.compat.tests.mock import patch, MagicMock +from units.compat.mock import patch, MagicMock from ansible.modules.network.vyos import vyos_config from ansible.plugins.cliconf.vyos import Cliconf from units.modules.utils import set_module_args diff --git a/test/units/modules/network/vyos/test_vyos_facts.py b/test/units/modules/network/vyos/test_vyos_facts.py index 4c421d80a3..901cb3f8e9 100644 --- a/test/units/modules/network/vyos/test_vyos_facts.py +++ b/test/units/modules/network/vyos/test_vyos_facts.py @@ -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.vyos import vyos_facts from units.modules.utils import set_module_args from .vyos_module import TestVyosModule, load_fixture diff --git a/test/units/modules/network/vyos/test_vyos_static_route.py b/test/units/modules/network/vyos/test_vyos_static_route.py index 85a47ec8ab..bee37a7a0d 100644 --- a/test/units/modules/network/vyos/test_vyos_static_route.py +++ b/test/units/modules/network/vyos/test_vyos_static_route.py @@ -19,7 +19,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.vyos import vyos_static_route from units.modules.utils import set_module_args from .vyos_module import TestVyosModule, load_fixture diff --git a/test/units/modules/network/vyos/test_vyos_system.py b/test/units/modules/network/vyos/test_vyos_system.py index 389538552e..1720735a3e 100644 --- a/test/units/modules/network/vyos/test_vyos_system.py +++ b/test/units/modules/network/vyos/test_vyos_system.py @@ -19,7 +19,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.vyos import vyos_system from units.modules.utils import set_module_args from .vyos_module import TestVyosModule, load_fixture diff --git a/test/units/modules/network/vyos/test_vyos_user.py b/test/units/modules/network/vyos/test_vyos_user.py index bdc73d7f01..784721c98f 100644 --- a/test/units/modules/network/vyos/test_vyos_user.py +++ b/test/units/modules/network/vyos/test_vyos_user.py @@ -19,7 +19,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.vyos import vyos_user from units.modules.utils import set_module_args from .vyos_module import TestVyosModule, load_fixture diff --git a/test/units/modules/packaging/os/conftest.py b/test/units/modules/packaging/os/conftest.py index 84742fbb61..4d34c3476b 100644 --- a/test/units/modules/packaging/os/conftest.py +++ b/test/units/modules/packaging/os/conftest.py @@ -1,4 +1,4 @@ -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.module_utils.six.moves import xmlrpc_client import pytest diff --git a/test/units/modules/packaging/os/test_apk.py b/test/units/modules/packaging/os/test_apk.py index 20dcd47ff9..96bae54532 100644 --- a/test/units/modules/packaging/os/test_apk.py +++ b/test/units/modules/packaging/os/test_apk.py @@ -1,5 +1,5 @@ -from ansible.compat.tests import mock -from ansible.compat.tests import unittest +from units.compat import mock +from units.compat import unittest from ansible.modules.packaging.os import apk diff --git a/test/units/modules/packaging/os/test_apt.py b/test/units/modules/packaging/os/test_apt.py index 3351da2517..e4ebcfafaa 100644 --- a/test/units/modules/packaging/os/test_apt.py +++ b/test/units/modules/packaging/os/test_apt.py @@ -2,8 +2,8 @@ import collections import os import sys -from ansible.compat.tests import mock -from ansible.compat.tests import unittest +from units.compat import mock +from units.compat import unittest try: from ansible.modules.packaging.os.apt import ( diff --git a/test/units/modules/packaging/os/test_rhn_register.py b/test/units/modules/packaging/os/test_rhn_register.py index 0cf4548a16..fb35cfb622 100644 --- a/test/units/modules/packaging/os/test_rhn_register.py +++ b/test/units/modules/packaging/os/test_rhn_register.py @@ -2,7 +2,7 @@ import contextlib import json import os -from ansible.compat.tests.mock import mock_open +from units.compat.mock import mock_open from ansible.module_utils import basic from ansible.module_utils._text import to_native import ansible.module_utils.six diff --git a/test/units/modules/packaging/os/test_yum.py b/test/units/modules/packaging/os/test_yum.py index ced0c4fc56..0ac554a1ff 100644 --- a/test/units/modules/packaging/os/test_yum.py +++ b/test/units/modules/packaging/os/test_yum.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from ansible.compat.tests import unittest +from units.compat import unittest from ansible.modules.packaging.os.yum import YumModule diff --git a/test/units/modules/remote_management/oneview/oneview_module_loader.py b/test/units/modules/remote_management/oneview/oneview_module_loader.py index b1c43f484f..e0b0789f2c 100644 --- a/test/units/modules/remote_management/oneview/oneview_module_loader.py +++ b/test/units/modules/remote_management/oneview/oneview_module_loader.py @@ -2,7 +2,7 @@ # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) import sys -from ansible.compat.tests.mock import patch, Mock +from units.compat.mock import patch, Mock # FIXME: These should be done inside of a fixture so that they're only mocked during # these unittests diff --git a/test/units/modules/remote_management/oneview/test_oneview_enclosure_facts.py b/test/units/modules/remote_management/oneview/test_oneview_enclosure_facts.py index 5d4a480d90..9504df3aba 100644 --- a/test/units/modules/remote_management/oneview/test_oneview_enclosure_facts.py +++ b/test/units/modules/remote_management/oneview/test_oneview_enclosure_facts.py @@ -1,7 +1,7 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from ansible.compat.tests import unittest +from units.compat import unittest from oneview_module_loader import OneViewModuleBase from ansible.modules.remote_management.oneview.oneview_enclosure_facts import EnclosureFactsModule from hpe_test_utils import FactsParamsTestCase diff --git a/test/units/modules/remote_management/oneview/test_oneview_ethernet_network.py b/test/units/modules/remote_management/oneview/test_oneview_ethernet_network.py index 01d3a1d477..107875b533 100644 --- a/test/units/modules/remote_management/oneview/test_oneview_ethernet_network.py +++ b/test/units/modules/remote_management/oneview/test_oneview_ethernet_network.py @@ -17,7 +17,7 @@ import yaml -from ansible.compat.tests import unittest, mock +from units.compat import unittest, mock from oneview_module_loader import EthernetNetworkModule, OneViewModuleResourceNotFound from hpe_test_utils import OneViewBaseTestCase diff --git a/test/units/modules/remote_management/oneview/test_oneview_ethernet_network_facts.py b/test/units/modules/remote_management/oneview/test_oneview_ethernet_network_facts.py index a15e8e21c5..c00b8bcde5 100644 --- a/test/units/modules/remote_management/oneview/test_oneview_ethernet_network_facts.py +++ b/test/units/modules/remote_management/oneview/test_oneview_ethernet_network_facts.py @@ -1,7 +1,7 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from ansible.compat.tests import unittest, mock +from units.compat import unittest, mock from oneview_module_loader import EthernetNetworkFactsModule from hpe_test_utils import FactsParamsTestCase diff --git a/test/units/modules/remote_management/oneview/test_oneview_fc_network.py b/test/units/modules/remote_management/oneview/test_oneview_fc_network.py index 1509300292..ad85a5b5c4 100644 --- a/test/units/modules/remote_management/oneview/test_oneview_fc_network.py +++ b/test/units/modules/remote_management/oneview/test_oneview_fc_network.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from ansible.compat.tests import unittest +from units.compat import unittest from oneview_module_loader import FcNetworkModule from hpe_test_utils import OneViewBaseTestCase diff --git a/test/units/modules/remote_management/oneview/test_oneview_fc_network_facts.py b/test/units/modules/remote_management/oneview/test_oneview_fc_network_facts.py index d771a93853..bb377b34b3 100644 --- a/test/units/modules/remote_management/oneview/test_oneview_fc_network_facts.py +++ b/test/units/modules/remote_management/oneview/test_oneview_fc_network_facts.py @@ -1,7 +1,7 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from ansible.compat.tests import unittest +from units.compat import unittest from oneview_module_loader import FcNetworkFactsModule from hpe_test_utils import FactsParamsTestCase diff --git a/test/units/modules/remote_management/oneview/test_oneview_fcoe_network.py b/test/units/modules/remote_management/oneview/test_oneview_fcoe_network.py index 333576c236..98ace0e866 100644 --- a/test/units/modules/remote_management/oneview/test_oneview_fcoe_network.py +++ b/test/units/modules/remote_management/oneview/test_oneview_fcoe_network.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from ansible.compat.tests import unittest +from units.compat import unittest from oneview_module_loader import FcoeNetworkModule from hpe_test_utils import OneViewBaseTestCase diff --git a/test/units/modules/remote_management/oneview/test_oneview_fcoe_network_facts.py b/test/units/modules/remote_management/oneview/test_oneview_fcoe_network_facts.py index a744b2e7d2..dea6f902fc 100644 --- a/test/units/modules/remote_management/oneview/test_oneview_fcoe_network_facts.py +++ b/test/units/modules/remote_management/oneview/test_oneview_fcoe_network_facts.py @@ -1,7 +1,7 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from ansible.compat.tests import unittest +from units.compat import unittest from oneview_module_loader import FcoeNetworkFactsModule diff --git a/test/units/modules/remote_management/oneview/test_oneview_logical_interconnect_group.py b/test/units/modules/remote_management/oneview/test_oneview_logical_interconnect_group.py index 467b8d2dd0..b96a29faa3 100644 --- a/test/units/modules/remote_management/oneview/test_oneview_logical_interconnect_group.py +++ b/test/units/modules/remote_management/oneview/test_oneview_logical_interconnect_group.py @@ -3,7 +3,7 @@ from copy import deepcopy -from ansible.compat.tests import unittest, mock +from units.compat import unittest, mock from oneview_module_loader import OneViewModuleBase from ansible.modules.remote_management.oneview.oneview_logical_interconnect_group import LogicalInterconnectGroupModule from hpe_test_utils import OneViewBaseTestCase diff --git a/test/units/modules/remote_management/oneview/test_oneview_logical_interconnect_group_facts.py b/test/units/modules/remote_management/oneview/test_oneview_logical_interconnect_group_facts.py index d1c179f54c..825aa53784 100644 --- a/test/units/modules/remote_management/oneview/test_oneview_logical_interconnect_group_facts.py +++ b/test/units/modules/remote_management/oneview/test_oneview_logical_interconnect_group_facts.py @@ -1,7 +1,7 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from ansible.compat.tests import unittest +from units.compat import unittest from oneview_module_loader import OneViewModuleBase from ansible.modules.remote_management.oneview.oneview_logical_interconnect_group_facts import LogicalInterconnectGroupFactsModule from hpe_test_utils import FactsParamsTestCase diff --git a/test/units/modules/remote_management/oneview/test_oneview_network_set.py b/test/units/modules/remote_management/oneview/test_oneview_network_set.py index ff381c63f5..97e31504b2 100644 --- a/test/units/modules/remote_management/oneview/test_oneview_network_set.py +++ b/test/units/modules/remote_management/oneview/test_oneview_network_set.py @@ -1,7 +1,7 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from ansible.compat.tests import unittest, mock +from units.compat import unittest, mock from hpe_test_utils import OneViewBaseTestCase from oneview_module_loader import NetworkSetModule diff --git a/test/units/modules/remote_management/oneview/test_oneview_network_set_facts.py b/test/units/modules/remote_management/oneview/test_oneview_network_set_facts.py index 9249e06f68..2e59e69b2b 100644 --- a/test/units/modules/remote_management/oneview/test_oneview_network_set_facts.py +++ b/test/units/modules/remote_management/oneview/test_oneview_network_set_facts.py @@ -1,7 +1,7 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from ansible.compat.tests import unittest +from units.compat import unittest from oneview_module_loader import NetworkSetFactsModule from hpe_test_utils import FactsParamsTestCase diff --git a/test/units/modules/remote_management/oneview/test_oneview_san_manager.py b/test/units/modules/remote_management/oneview/test_oneview_san_manager.py index f97e56a50d..3ab32651d7 100644 --- a/test/units/modules/remote_management/oneview/test_oneview_san_manager.py +++ b/test/units/modules/remote_management/oneview/test_oneview_san_manager.py @@ -1,7 +1,7 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from ansible.compat.tests import unittest, mock +from units.compat import unittest, mock from oneview_module_loader import SanManagerModule from hpe_test_utils import OneViewBaseTestCase from copy import deepcopy diff --git a/test/units/modules/remote_management/oneview/test_oneview_san_manager_facts.py b/test/units/modules/remote_management/oneview/test_oneview_san_manager_facts.py index da78f8038c..efed88cc42 100644 --- a/test/units/modules/remote_management/oneview/test_oneview_san_manager_facts.py +++ b/test/units/modules/remote_management/oneview/test_oneview_san_manager_facts.py @@ -1,7 +1,7 @@ # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from ansible.compat.tests import unittest +from units.compat import unittest from oneview_module_loader import SanManagerFactsModule from hpe_test_utils import FactsParamsTestCase diff --git a/test/units/modules/source_control/test_gitlab_deploy_key.py b/test/units/modules/source_control/test_gitlab_deploy_key.py index 162702e520..c5da89a31e 100644 --- a/test/units/modules/source_control/test_gitlab_deploy_key.py +++ b/test/units/modules/source_control/test_gitlab_deploy_key.py @@ -2,7 +2,7 @@ # Copyright (c) 2018 Marcus Watkins # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.modules.source_control import gitlab_deploy_key from ansible.module_utils._text import to_bytes from ansible.module_utils import basic diff --git a/test/units/modules/source_control/test_gitlab_hooks.py b/test/units/modules/source_control/test_gitlab_hooks.py index 7acb8d66f6..7b1230d427 100644 --- a/test/units/modules/source_control/test_gitlab_hooks.py +++ b/test/units/modules/source_control/test_gitlab_hooks.py @@ -2,7 +2,7 @@ # Copyright (c) 2018 Marcus Watkins # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.modules.source_control import gitlab_hooks from ansible.module_utils._text import to_bytes from ansible.module_utils import basic diff --git a/test/units/modules/source_control/test_gitlab_project.py b/test/units/modules/source_control/test_gitlab_project.py index f576cf8a29..1d93aa619b 100644 --- a/test/units/modules/source_control/test_gitlab_project.py +++ b/test/units/modules/source_control/test_gitlab_project.py @@ -4,7 +4,7 @@ import json -from ansible.compat.tests.mock import MagicMock +from units.compat.mock import MagicMock from ansible.modules.source_control import gitlab_project import pytest diff --git a/test/units/modules/storage/netapp/test_netapp_e_alerts.py b/test/units/modules/storage/netapp/test_netapp_e_alerts.py index 63b6b236fa..4e8aba0719 100644 --- a/test/units/modules/storage/netapp/test_netapp_e_alerts.py +++ b/test/units/modules/storage/netapp/test_netapp_e_alerts.py @@ -6,7 +6,7 @@ from ansible.modules.storage.netapp.netapp_e_alerts import Alerts from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args __metaclass__ = type -from ansible.compat.tests import mock +from units.compat import mock class AlertsTest(ModuleTestCase): diff --git a/test/units/modules/storage/netapp/test_netapp_e_asup.py b/test/units/modules/storage/netapp/test_netapp_e_asup.py index bcc170f5bd..90dd5bb7ff 100644 --- a/test/units/modules/storage/netapp/test_netapp_e_asup.py +++ b/test/units/modules/storage/netapp/test_netapp_e_asup.py @@ -6,7 +6,7 @@ from ansible.modules.storage.netapp.netapp_e_asup import Asup from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args __metaclass__ = type -from ansible.compat.tests import mock +from units.compat import mock class AsupTest(ModuleTestCase): diff --git a/test/units/modules/storage/netapp/test_netapp_e_auditlog.py b/test/units/modules/storage/netapp/test_netapp_e_auditlog.py index f7211a4a54..d7f370aab4 100644 --- a/test/units/modules/storage/netapp/test_netapp_e_auditlog.py +++ b/test/units/modules/storage/netapp/test_netapp_e_auditlog.py @@ -5,7 +5,7 @@ from ansible.modules.storage.netapp.netapp_e_auditlog import AuditLog from units.modules.utils import AnsibleFailJson, ModuleTestCase, set_module_args __metaclass__ = type -from ansible.compat.tests import mock +from units.compat import mock class AuditLogTests(ModuleTestCase): diff --git a/test/units/modules/storage/netapp/test_netapp_e_global.py b/test/units/modules/storage/netapp/test_netapp_e_global.py index d3027f22ca..ff13bd3b56 100644 --- a/test/units/modules/storage/netapp/test_netapp_e_global.py +++ b/test/units/modules/storage/netapp/test_netapp_e_global.py @@ -6,7 +6,7 @@ from ansible.modules.storage.netapp.netapp_e_global import GlobalSettings from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args __metaclass__ = type -from ansible.compat.tests import mock +from units.compat import mock class GlobalSettingsTest(ModuleTestCase): diff --git a/test/units/modules/storage/netapp/test_netapp_e_host.py b/test/units/modules/storage/netapp/test_netapp_e_host.py index 24971ecf87..77ed009f54 100644 --- a/test/units/modules/storage/netapp/test_netapp_e_host.py +++ b/test/units/modules/storage/netapp/test_netapp_e_host.py @@ -13,7 +13,7 @@ import unittest import mock import pytest import json -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.module_utils._text import to_bytes diff --git a/test/units/modules/storage/netapp/test_netapp_e_iscsi_interface.py b/test/units/modules/storage/netapp/test_netapp_e_iscsi_interface.py index 93dd6f718a..7108148ccf 100644 --- a/test/units/modules/storage/netapp/test_netapp_e_iscsi_interface.py +++ b/test/units/modules/storage/netapp/test_netapp_e_iscsi_interface.py @@ -14,7 +14,7 @@ import unittest import mock import pytest import json -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.module_utils._text import to_bytes diff --git a/test/units/modules/storage/netapp/test_netapp_e_iscsi_target.py b/test/units/modules/storage/netapp/test_netapp_e_iscsi_target.py index d73555fadc..8f44fb06c2 100644 --- a/test/units/modules/storage/netapp/test_netapp_e_iscsi_target.py +++ b/test/units/modules/storage/netapp/test_netapp_e_iscsi_target.py @@ -11,7 +11,7 @@ __metaclass__ = type import mock -from ansible.compat.tests.mock import PropertyMock +from units.compat.mock import PropertyMock class IscsiTargetTest(ModuleTestCase): diff --git a/test/units/modules/storage/netapp/test_netapp_e_ldap.py b/test/units/modules/storage/netapp/test_netapp_e_ldap.py index d90a1ddaee..baa95ede1f 100644 --- a/test/units/modules/storage/netapp/test_netapp_e_ldap.py +++ b/test/units/modules/storage/netapp/test_netapp_e_ldap.py @@ -9,7 +9,7 @@ from ansible.modules.storage.netapp.netapp_e_ldap import Ldap from units.modules.utils import ModuleTestCase, set_module_args, AnsibleFailJson, AnsibleExitJson __metaclass__ = type -from ansible.compat.tests import mock +from units.compat import mock class LdapTest(ModuleTestCase): diff --git a/test/units/modules/storage/netapp/test_netapp_e_mgmt_interface.py b/test/units/modules/storage/netapp/test_netapp_e_mgmt_interface.py index cf1de64277..e7b930713b 100644 --- a/test/units/modules/storage/netapp/test_netapp_e_mgmt_interface.py +++ b/test/units/modules/storage/netapp/test_netapp_e_mgmt_interface.py @@ -10,7 +10,7 @@ from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase __metaclass__ = type import mock -from ansible.compat.tests.mock import PropertyMock +from units.compat.mock import PropertyMock class MgmtInterfaceTest(ModuleTestCase): diff --git a/test/units/modules/storage/netapp/test_netapp_e_syslog.py b/test/units/modules/storage/netapp/test_netapp_e_syslog.py index 1a8c8762dd..447757b74c 100644 --- a/test/units/modules/storage/netapp/test_netapp_e_syslog.py +++ b/test/units/modules/storage/netapp/test_netapp_e_syslog.py @@ -8,7 +8,7 @@ from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase import time __metaclass__ = type -from ansible.compat.tests import mock +from units.compat import mock class AsupTest(ModuleTestCase): diff --git a/test/units/modules/system/interfaces_file/test_interfaces_file.py b/test/units/modules/system/interfaces_file/test_interfaces_file.py index 512452a0c2..70e56e0fb1 100644 --- a/test/units/modules/system/interfaces_file/test_interfaces_file.py +++ b/test/units/modules/system/interfaces_file/test_interfaces_file.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . -from ansible.compat.tests import unittest +from units.compat import unittest from ansible.modules.system import interfaces_file import os import json diff --git a/test/units/modules/system/test_iptables.py b/test/units/modules/system/test_iptables.py index b9b94ef3d1..1e1ec34383 100644 --- a/test/units/modules/system/test_iptables.py +++ b/test/units/modules/system/test_iptables.py @@ -1,4 +1,4 @@ -from ansible.compat.tests.mock import patch +from units.compat.mock import patch from ansible.module_utils import basic from ansible.modules.system import iptables from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/test/units/modules/system/test_java_keystore.py b/test/units/modules/system/test_java_keystore.py index 0aac4a0c74..b46973faed 100644 --- a/test/units/modules/system/test_java_keystore.py +++ b/test/units/modules/system/test_java_keystore.py @@ -8,8 +8,8 @@ import os from units.modules.utils import ModuleTestCase, set_module_args -from ansible.compat.tests.mock import patch -from ansible.compat.tests.mock import Mock +from units.compat.mock import patch +from units.compat.mock import Mock from ansible.module_utils.basic import AnsibleModule from ansible.modules.system.java_keystore import create_jks, cert_changed, ArgumentSpec diff --git a/test/units/modules/system/test_known_hosts.py b/test/units/modules/system/test_known_hosts.py index b34c4d84ca..936e80d784 100644 --- a/test/units/modules/system/test_known_hosts.py +++ b/test/units/modules/system/test_known_hosts.py @@ -2,7 +2,7 @@ import os import tempfile import ansible.module_utils.basic as basic -from ansible.compat.tests import unittest +from units.compat import unittest from ansible.module_utils._text import to_bytes from ansible.module_utils.basic import AnsibleModule diff --git a/test/units/modules/system/test_linux_mountinfo.py b/test/units/modules/system/test_linux_mountinfo.py index 46863635e7..4946dd9173 100644 --- a/test/units/modules/system/test_linux_mountinfo.py +++ b/test/units/modules/system/test_linux_mountinfo.py @@ -1,7 +1,7 @@ import os import tempfile -from ansible.compat.tests import unittest +from units.compat import unittest from ansible.module_utils._text import to_bytes from ansible.modules.system.mount import get_linux_mounts diff --git a/test/units/modules/system/test_pamd.py b/test/units/modules/system/test_pamd.py index 6a7141c69d..5d27edc729 100644 --- a/test/units/modules/system/test_pamd.py +++ b/test/units/modules/system/test_pamd.py @@ -1,5 +1,5 @@ from __future__ import (absolute_import, division, print_function) -from ansible.compat.tests import unittest +from units.compat import unittest from ansible.modules.system.pamd import PamdRule from ansible.modules.system.pamd import PamdLine diff --git a/test/units/modules/system/test_parted.py b/test/units/modules/system/test_parted.py index df141af797..91439ffea3 100644 --- a/test/units/modules/system/test_parted.py +++ b/test/units/modules/system/test_parted.py @@ -16,7 +16,7 @@ # along with Ansible. If not, see . __metaclass__ = type -from ansible.compat.tests.mock import patch, call +from units.compat.mock import patch, call from ansible.modules.system import parted as parted_module from ansible.modules.system.parted import parse_partition_info from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/test/units/modules/system/test_systemd.py b/test/units/modules/system/test_systemd.py index 7ffeb969bd..b2a1cd69a0 100644 --- a/test/units/modules/system/test_systemd.py +++ b/test/units/modules/system/test_systemd.py @@ -1,7 +1,7 @@ import os import tempfile -from ansible.compat.tests import unittest +from units.compat import unittest from ansible.modules.system.systemd import parse_systemctl_show diff --git a/test/units/modules/utils.py b/test/units/modules/utils.py index 91fb4c9522..af471f873a 100644 --- a/test/units/modules/utils.py +++ b/test/units/modules/utils.py @@ -1,7 +1,7 @@ import json -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 diff --git a/test/units/parsing/test_dataloader.py b/test/units/parsing/test_dataloader.py index 79ea1ceb29..264c9f7481 100644 --- a/test/units/parsing/test_dataloader.py +++ b/test/units/parsing/test_dataloader.py @@ -21,8 +21,8 @@ __metaclass__ = type import os -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import patch, mock_open +from units.compat import unittest +from units.compat.mock import patch, mock_open from ansible.errors import AnsibleParserError, yaml_strings from ansible.module_utils._text import to_text from ansible.module_utils.six import PY3 diff --git a/test/units/parsing/utils/test_jsonify.py b/test/units/parsing/utils/test_jsonify.py index 7f741c355c..37be7824e7 100644 --- a/test/units/parsing/utils/test_jsonify.py +++ b/test/units/parsing/utils/test_jsonify.py @@ -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 ansible.parsing.utils.jsonify import jsonify diff --git a/test/units/parsing/vault/test_vault.py b/test/units/parsing/vault/test_vault.py index 20c64a9b20..1c103751ca 100644 --- a/test/units/parsing/vault/test_vault.py +++ b/test/units/parsing/vault/test_vault.py @@ -29,8 +29,8 @@ import tempfile from binascii import hexlify 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 import errors from ansible.module_utils import six diff --git a/test/units/parsing/vault/test_vault_editor.py b/test/units/parsing/vault/test_vault_editor.py index b9166a334b..6a93896a21 100644 --- a/test/units/parsing/vault/test_vault_editor.py +++ b/test/units/parsing/vault/test_vault_editor.py @@ -25,8 +25,8 @@ import tempfile import pytest -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 import errors from ansible.parsing import vault diff --git a/test/units/parsing/yaml/test_dumper.py b/test/units/parsing/yaml/test_dumper.py index ba8fa523fb..1643bdc093 100644 --- a/test/units/parsing/yaml/test_dumper.py +++ b/test/units/parsing/yaml/test_dumper.py @@ -20,7 +20,7 @@ __metaclass__ = type import io -from ansible.compat.tests import unittest +from units.compat import unittest from ansible.parsing import vault from ansible.parsing.yaml import dumper, objects from ansible.parsing.yaml.loader import AnsibleLoader diff --git a/test/units/parsing/yaml/test_loader.py b/test/units/parsing/yaml/test_loader.py index e835146c62..363ed0454b 100644 --- a/test/units/parsing/yaml/test_loader.py +++ b/test/units/parsing/yaml/test_loader.py @@ -22,7 +22,7 @@ __metaclass__ = type from io import StringIO -from ansible.compat.tests import unittest +from units.compat import unittest from ansible import errors from ansible.module_utils.six import text_type, binary_type diff --git a/test/units/parsing/yaml/test_objects.py b/test/units/parsing/yaml/test_objects.py index 6be7fbb783..0131f82183 100644 --- a/test/units/parsing/yaml/test_objects.py +++ b/test/units/parsing/yaml/test_objects.py @@ -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.errors import AnsibleError diff --git a/test/units/playbook/role/test_include_role.py b/test/units/playbook/role/test_include_role.py index 342fa7d73c..93e222c4a9 100644 --- a/test/units/playbook/role/test_include_role.py +++ b/test/units/playbook/role/test_include_role.py @@ -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.playbook import Play from ansible.playbook.role_include import IncludeRole diff --git a/test/units/playbook/role/test_role.py b/test/units/playbook/role/test_role.py index 575153541a..fc61b7d400 100644 --- a/test/units/playbook/role/test_role.py +++ b/test/units/playbook/role/test_role.py @@ -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.module_utils.common._collections_compat import Container diff --git a/test/units/playbook/test_attribute.py b/test/units/playbook/test_attribute.py index 216966c15c..c29aa1d1a5 100644 --- a/test/units/playbook/test_attribute.py +++ b/test/units/playbook/test_attribute.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . -from ansible.compat.tests import unittest +from units.compat import unittest from ansible.playbook.attribute import Attribute diff --git a/test/units/playbook/test_base.py b/test/units/playbook/test_base.py index f52fd9e3f3..a8dcf84874 100644 --- a/test/units/playbook/test_base.py +++ b/test/units/playbook/test_base.py @@ -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 ansible.errors import AnsibleParserError from ansible.module_utils.six import string_types diff --git a/test/units/playbook/test_block.py b/test/units/playbook/test_block.py index 4d191a287a..d88f40208c 100644 --- a/test/units/playbook/test_block.py +++ b/test/units/playbook/test_block.py @@ -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 ansible.playbook.block import Block from ansible.playbook.task import Task diff --git a/test/units/playbook/test_conditional.py b/test/units/playbook/test_conditional.py index 164cccd55c..4e392843fd 100644 --- a/test/units/playbook/test_conditional.py +++ b/test/units/playbook/test_conditional.py @@ -1,5 +1,5 @@ -from ansible.compat.tests import unittest +from units.compat import unittest from units.mock.loader import DictDataLoader from ansible.plugins.strategy import SharedPluginLoaderObj diff --git a/test/units/playbook/test_helpers.py b/test/units/playbook/test_helpers.py index 65e0f8291d..816c221d46 100644 --- a/test/units/playbook/test_helpers.py +++ b/test/units/playbook/test_helpers.py @@ -21,8 +21,8 @@ __metaclass__ = type import os -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 units.mock.loader import DictDataLoader from ansible import errors diff --git a/test/units/playbook/test_included_file.py b/test/units/playbook/test_included_file.py index 757228da18..e4f1b3bd18 100644 --- a/test/units/playbook/test_included_file.py +++ b/test/units/playbook/test_included_file.py @@ -23,7 +23,7 @@ import os import pytest -from ansible.compat.tests.mock import MagicMock +from units.compat.mock import MagicMock from units.mock.loader import DictDataLoader from ansible.playbook.task import Task diff --git a/test/units/playbook/test_play.py b/test/units/playbook/test_play.py index 064fbd2aa7..1bce51f67a 100644 --- a/test/units/playbook/test_play.py +++ b/test/units/playbook/test_play.py @@ -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.playbook.block import Block diff --git a/test/units/playbook/test_play_context.py b/test/units/playbook/test_play_context.py index 266801601e..c3ad79e283 100644 --- a/test/units/playbook/test_play_context.py +++ b/test/units/playbook/test_play_context.py @@ -13,7 +13,7 @@ import pytest from ansible import constants as C from ansible.cli import CLI -from ansible.compat.tests import unittest +from units.compat import unittest from ansible.errors import AnsibleError, AnsibleParserError from ansible.module_utils.six.moves import shlex_quote from ansible.playbook.play_context import PlayContext diff --git a/test/units/playbook/test_playbook.py b/test/units/playbook/test_playbook.py index 75db3025e8..5220aed750 100644 --- a/test/units/playbook/test_playbook.py +++ b/test/units/playbook/test_playbook.py @@ -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.playbook import Playbook from ansible.vars.manager import VariableManager diff --git a/test/units/playbook/test_taggable.py b/test/units/playbook/test_taggable.py index f10a89e1d8..573c132924 100644 --- a/test/units/playbook/test_taggable.py +++ b/test/units/playbook/test_taggable.py @@ -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 ansible.playbook.taggable import Taggable from units.mock.loader import DictDataLoader diff --git a/test/units/playbook/test_task.py b/test/units/playbook/test_task.py index c9976428d0..e8326ed246 100644 --- a/test/units/playbook/test_task.py +++ b/test/units/playbook/test_task.py @@ -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.playbook.task import Task from ansible.parsing.yaml import objects from ansible import errors diff --git a/test/units/plugins/action/test_action.py b/test/units/plugins/action/test_action.py index 04f287561f..f08d2644d0 100644 --- a/test/units/plugins/action/test_action.py +++ b/test/units/plugins/action/test_action.py @@ -24,8 +24,8 @@ import os import re from ansible import constants as C -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import patch, MagicMock, mock_open +from units.compat import unittest +from units.compat.mock import patch, MagicMock, mock_open from ansible.errors import AnsibleError from ansible.module_utils.six import text_type diff --git a/test/units/plugins/action/test_raw.py b/test/units/plugins/action/test_raw.py index 5e4be9b03b..455c910d7d 100644 --- a/test/units/plugins/action/test_raw.py +++ b/test/units/plugins/action/test_raw.py @@ -21,8 +21,8 @@ __metaclass__ = type import os from ansible.errors import AnsibleActionFail -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.plugins.action.raw import ActionModule from ansible.playbook.task import Task from ansible.plugins.loader import connection_loader diff --git a/test/units/plugins/action/test_synchronize.py b/test/units/plugins/action/test_synchronize.py index c669422d18..0b24ec6722 100644 --- a/test/units/plugins/action/test_synchronize.py +++ b/test/units/plugins/action/test_synchronize.py @@ -19,7 +19,7 @@ import yaml from pprint import pprint import ansible.plugins -from ansible.compat.tests.mock import patch, MagicMock +from units.compat.mock import patch, MagicMock from ansible.plugins.action.synchronize import ActionModule diff --git a/test/units/plugins/action/test_win_updates.py b/test/units/plugins/action/test_win_updates.py index 340fe9b950..80b8017879 100644 --- a/test/units/plugins/action/test_win_updates.py +++ b/test/units/plugins/action/test_win_updates.py @@ -8,7 +8,7 @@ __metaclass__ = type import pytest -from ansible.compat.tests.mock import patch, MagicMock, mock_open +from units.compat.mock import patch, MagicMock, mock_open from ansible.plugins.action.win_updates import ActionModule from ansible.playbook.task import Task diff --git a/test/units/plugins/cache/test_cache.py b/test/units/plugins/cache/test_cache.py index 0fd14682e8..2f2d256cb7 100644 --- a/test/units/plugins/cache/test_cache.py +++ b/test/units/plugins/cache/test_cache.py @@ -19,7 +19,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible.compat.tests import unittest, mock +from units.compat import unittest, mock from ansible.errors import AnsibleError from ansible.plugins.cache import FactCache from ansible.plugins.cache.base import BaseCacheModule diff --git a/test/units/plugins/callback/test_callback.py b/test/units/plugins/callback/test_callback.py index 6e40ab47b5..04c395d3c6 100644 --- a/test/units/plugins/callback/test_callback.py +++ b/test/units/plugins/callback/test_callback.py @@ -23,8 +23,8 @@ import re import textwrap import types -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import patch, mock_open, MagicMock +from units.compat import unittest +from units.compat.mock import patch, mock_open, MagicMock from ansible.plugins.callback import CallbackBase diff --git a/test/units/plugins/cliconf/test_nos.py b/test/units/plugins/cliconf/test_nos.py index f511a8d3fa..22d0be4468 100644 --- a/test/units/plugins/cliconf/test_nos.py +++ b/test/units/plugins/cliconf/test_nos.py @@ -24,7 +24,7 @@ import json from mock import MagicMock, call -from ansible.compat.tests import unittest +from units.compat import unittest from ansible.plugins.cliconf import nos FIXTURE_DIR = b'%s/fixtures/nos' % ( diff --git a/test/units/plugins/cliconf/test_slxos.py b/test/units/plugins/cliconf/test_slxos.py index 10e199a2b5..5befc768f5 100644 --- a/test/units/plugins/cliconf/test_slxos.py +++ b/test/units/plugins/cliconf/test_slxos.py @@ -24,7 +24,7 @@ import json from mock import MagicMock, call -from ansible.compat.tests import unittest +from units.compat import unittest from ansible.plugins.cliconf import slxos FIXTURE_DIR = b'%s/fixtures/slxos' % ( diff --git a/test/units/plugins/connection/test_connection.py b/test/units/plugins/connection/test_connection.py index cfcbdad9de..d54056bd8e 100644 --- a/test/units/plugins/connection/test_connection.py +++ b/test/units/plugins/connection/test_connection.py @@ -23,10 +23,10 @@ from io import StringIO import sys import pytest -from ansible.compat.tests import mock -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import MagicMock -from ansible.compat.tests.mock import patch +from units.compat import mock +from units.compat import unittest +from units.compat.mock import MagicMock +from units.compat.mock import patch from ansible.errors import AnsibleError from ansible.playbook.play_context import PlayContext from ansible.plugins.connection import ConnectionBase diff --git a/test/units/plugins/connection/test_netconf.py b/test/units/plugins/connection/test_netconf.py index 2b8dbaf952..fe5f4b5ff7 100644 --- a/test/units/plugins/connection/test_netconf.py +++ b/test/units/plugins/connection/test_netconf.py @@ -27,8 +27,8 @@ import pytest from io import StringIO -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import patch, MagicMock, PropertyMock +from units.compat import unittest +from units.compat.mock import patch, MagicMock, PropertyMock from ansible.errors import AnsibleConnectionFailure from ansible.playbook.play_context import PlayContext diff --git a/test/units/plugins/connection/test_network_cli.py b/test/units/plugins/connection/test_network_cli.py index d6938c51f2..4807795601 100644 --- a/test/units/plugins/connection/test_network_cli.py +++ b/test/units/plugins/connection/test_network_cli.py @@ -25,8 +25,8 @@ import json from io import StringIO -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 AnsibleConnectionFailure from ansible.playbook.play_context import PlayContext diff --git a/test/units/plugins/connection/test_ssh.py b/test/units/plugins/connection/test_ssh.py index 0c7e5c86e6..0077fd7d6f 100644 --- a/test/units/plugins/connection/test_ssh.py +++ b/test/units/plugins/connection/test_ssh.py @@ -26,8 +26,8 @@ import pytest from ansible import constants as C from ansible.compat.selectors import SelectorKey, EVENT_READ -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import patch, MagicMock, PropertyMock +from units.compat import unittest +from units.compat.mock import patch, MagicMock, PropertyMock from ansible.errors import AnsibleError, AnsibleConnectionFailure, AnsibleFileNotFound from ansible.module_utils.six.moves import shlex_quote from ansible.module_utils._text import to_bytes diff --git a/test/units/plugins/connection/test_winrm.py b/test/units/plugins/connection/test_winrm.py index e906a9d2b3..f59d75e707 100644 --- a/test/units/plugins/connection/test_winrm.py +++ b/test/units/plugins/connection/test_winrm.py @@ -10,7 +10,7 @@ import pytest from io import StringIO -from ansible.compat.tests.mock import patch, MagicMock +from units.compat.mock import patch, MagicMock from ansible.errors import AnsibleConnectionFailure from ansible.module_utils._text import to_bytes from ansible.playbook.play_context import PlayContext diff --git a/test/units/plugins/filter/test_ipaddr.py b/test/units/plugins/filter/test_ipaddr.py index 7969c88d67..355f4f4159 100644 --- a/test/units/plugins/filter/test_ipaddr.py +++ b/test/units/plugins/filter/test_ipaddr.py @@ -20,7 +20,7 @@ __metaclass__ = type import sys import pytest -from ansible.compat.tests import unittest +from units.compat import unittest from ansible.errors import AnsibleFilterError from ansible.plugins.filter.ipaddr import (ipaddr, _netmask_query, nthhost, next_nth_usable, ipsubnet, previous_nth_usable, network_in_usable, network_in_network, diff --git a/test/units/plugins/filter/test_network.py b/test/units/plugins/filter/test_network.py index d1f4b49282..3174b86756 100644 --- a/test/units/plugins/filter/test_network.py +++ b/test/units/plugins/filter/test_network.py @@ -22,7 +22,7 @@ import sys import pytest -from ansible.compat.tests import unittest +from units.compat import unittest from ansible.plugins.filter.network import parse_xml, type5_pw, hash_salt, comp_type5 from ansible.errors import AnsibleFilterError diff --git a/test/units/plugins/httpapi/test_ftd.py b/test/units/plugins/httpapi/test_ftd.py index f382e3e949..4573674821 100644 --- a/test/units/plugins/httpapi/test_ftd.py +++ b/test/units/plugins/httpapi/test_ftd.py @@ -22,9 +22,10 @@ from io import BytesIO from ansible.module_utils.six.moves.urllib.error import HTTPError -from ansible.compat.tests import mock -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import mock_open, patch +from units.compat import mock +from units.compat import unittest +from units.compat.builtins import BUILTINS +from units.compat.mock import mock_open, patch from ansible.errors import AnsibleConnectionFailure from ansible.module_utils.connection import ConnectionError from ansible.module_utils.network.ftd.common import HTTPMethod, ResponseParams @@ -32,11 +33,6 @@ from ansible.module_utils.network.ftd.fdm_swagger_client import SpecProp, FdmSwa from ansible.module_utils.six import PY3, StringIO from ansible.plugins.httpapi.ftd import HttpApi -if PY3: - BUILTINS_NAME = 'builtins' -else: - BUILTINS_NAME = '__builtin__' - EXPECTED_BASE_HEADERS = { 'Accept': 'application/json', 'Content-Type': 'application/json' @@ -191,7 +187,7 @@ class TestFtdHttpApi(unittest.TestCase): self.connection_mock.send.return_value = self._connection_response('File content') open_mock = mock_open() - with patch('%s.open' % BUILTINS_NAME, open_mock): + with patch('%s.open' % BUILTINS, open_mock): self.ftd_plugin.download_file('/files/1', '/tmp/test.txt') open_mock.assert_called_once_with('/tmp/test.txt', 'wb') @@ -206,7 +202,7 @@ class TestFtdHttpApi(unittest.TestCase): self.connection_mock.send.return_value = response, response_data open_mock = mock_open() - with patch('%s.open' % BUILTINS_NAME, open_mock): + with patch('%s.open' % BUILTINS, open_mock): self.ftd_plugin.download_file('/files/1', '/tmp/') open_mock.assert_called_once_with('/tmp/%s' % filename, 'wb') @@ -219,7 +215,7 @@ class TestFtdHttpApi(unittest.TestCase): self.connection_mock.send.return_value = self._connection_response({'id': '123'}) open_mock = mock_open() - with patch('%s.open' % BUILTINS_NAME, open_mock): + with patch('%s.open' % BUILTINS, open_mock): resp = self.ftd_plugin.upload_file('/tmp/test.txt', '/files') assert {'id': '123'} == resp @@ -237,7 +233,7 @@ class TestFtdHttpApi(unittest.TestCase): self.connection_mock.send.return_value = self._connection_response('invalidJsonResponse') open_mock = mock_open() - with patch('%s.open' % BUILTINS_NAME, open_mock): + with patch('%s.open' % BUILTINS, open_mock): with self.assertRaises(ConnectionError) as res: self.ftd_plugin.upload_file('/tmp/test.txt', '/files') diff --git a/test/units/plugins/inventory/test_group.py b/test/units/plugins/inventory/test_group.py index 086c7cf798..5c995cdd2a 100644 --- a/test/units/plugins/inventory/test_group.py +++ b/test/units/plugins/inventory/test_group.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . -from ansible.compat.tests import unittest +from units.compat import unittest from ansible.inventory.group import Group from ansible.inventory.host import Host diff --git a/test/units/plugins/inventory/test_host.py b/test/units/plugins/inventory/test_host.py index 1353474b14..f0e4b131ad 100644 --- a/test/units/plugins/inventory/test_host.py +++ b/test/units/plugins/inventory/test_host.py @@ -18,7 +18,7 @@ # for __setstate__/__getstate__ tests import pickle -from ansible.compat.tests import unittest +from units.compat import unittest from ansible.inventory.group import Group from ansible.inventory.host import Host diff --git a/test/units/plugins/inventory/test_inventory.py b/test/units/plugins/inventory/test_inventory.py index 394ae53df7..48c3f9834a 100644 --- a/test/units/plugins/inventory/test_inventory.py +++ b/test/units/plugins/inventory/test_inventory.py @@ -23,8 +23,8 @@ import string import textwrap from ansible import constants as C -from ansible.compat.tests import mock -from ansible.compat.tests import unittest +from units.compat import mock +from units.compat import unittest from ansible.module_utils.six import string_types from ansible.module_utils._text import to_text from units.mock.path import mock_unfrackpath_noop diff --git a/test/units/plugins/inventory/test_script.py b/test/units/plugins/inventory/test_script.py index fdd4d7c9ea..5f0548130c 100644 --- a/test/units/plugins/inventory/test_script.py +++ b/test/units/plugins/inventory/test_script.py @@ -26,8 +26,8 @@ import pytest from ansible import constants as C from ansible.errors import AnsibleError from ansible.plugins.loader import PluginLoader -from ansible.compat.tests import mock -from ansible.compat.tests import unittest +from units.compat import mock +from units.compat import unittest from ansible.module_utils._text import to_bytes, to_native diff --git a/test/units/plugins/lookup/test_conjur_variable.py b/test/units/plugins/lookup/test_conjur_variable.py index a5b5401704..c2fa87c781 100644 --- a/test/units/plugins/lookup/test_conjur_variable.py +++ b/test/units/plugins/lookup/test_conjur_variable.py @@ -22,7 +22,7 @@ __metaclass__ = type import pytest -from ansible.compat.tests.mock import MagicMock +from units.compat.mock import MagicMock from ansible.errors import AnsibleError from ansible.module_utils.six.moves import http_client from ansible.plugins.lookup import conjur_variable diff --git a/test/units/plugins/lookup/test_ini.py b/test/units/plugins/lookup/test_ini.py index 46b4c463bc..eaa800166b 100644 --- a/test/units/plugins/lookup/test_ini.py +++ b/test/units/plugins/lookup/test_ini.py @@ -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.plugins.lookup.ini import _parse_params diff --git a/test/units/plugins/lookup/test_lastpass.py b/test/units/plugins/lookup/test_lastpass.py index fe5d60f8b8..d8d708d32b 100644 --- a/test/units/plugins/lookup/test_lastpass.py +++ b/test/units/plugins/lookup/test_lastpass.py @@ -21,8 +21,8 @@ __metaclass__ = type from argparse import ArgumentParser -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.errors import AnsibleError from ansible.module_utils import six diff --git a/test/units/plugins/lookup/test_onepassword.py b/test/units/plugins/lookup/test_onepassword.py index 955d6a51c5..0f67c8bc42 100644 --- a/test/units/plugins/lookup/test_onepassword.py +++ b/test/units/plugins/lookup/test_onepassword.py @@ -15,8 +15,8 @@ except ImportError: from argparse import ArgumentParser -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.errors import AnsibleError from ansible.plugins.lookup.onepassword import OnePass, LookupModule from ansible.plugins.lookup.onepassword_raw import LookupModule as OnePasswordRawLookup diff --git a/test/units/plugins/lookup/test_password.py b/test/units/plugins/lookup/test_password.py index 8f3e31750d..d48da17e06 100644 --- a/test/units/plugins/lookup/test_password.py +++ b/test/units/plugins/lookup/test_password.py @@ -24,8 +24,8 @@ import passlib from passlib.handlers import pbkdf2 from units.mock.loader import DictDataLoader -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import mock_open, patch +from units.compat import unittest +from units.compat.mock import mock_open, patch from ansible.errors import AnsibleError from ansible.module_utils.six import text_type from ansible.module_utils.six.moves import builtins diff --git a/test/units/plugins/strategy/test_strategy_base.py b/test/units/plugins/strategy/test_strategy_base.py index 909c86089b..57f615125c 100644 --- a/test/units/plugins/strategy/test_strategy_base.py +++ b/test/units/plugins/strategy/test_strategy_base.py @@ -23,8 +23,8 @@ from units.mock.loader import DictDataLoader from copy import deepcopy import uuid -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.process.worker import WorkerProcess from ansible.executor.task_queue_manager import TaskQueueManager diff --git a/test/units/plugins/strategy/test_strategy_linear.py b/test/units/plugins/strategy/test_strategy_linear.py index af15bc0d20..a9fa5ae351 100644 --- a/test/units/plugins/strategy/test_strategy_linear.py +++ b/test/units/plugins/strategy/test_strategy_linear.py @@ -6,8 +6,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.play_iterator import PlayIterator from ansible.playbook import Playbook diff --git a/test/units/plugins/terminal/test_slxos.py b/test/units/plugins/terminal/test_slxos.py index 4c5f3b30b3..ece3169c7f 100644 --- a/test/units/plugins/terminal/test_slxos.py +++ b/test/units/plugins/terminal/test_slxos.py @@ -24,7 +24,7 @@ import json from mock import MagicMock -from ansible.compat.tests import unittest +from units.compat import unittest from ansible.plugins.terminal import slxos from ansible.errors import AnsibleConnectionFailure diff --git a/test/units/plugins/test_plugins.py b/test/units/plugins/test_plugins.py index 8ede0d4d27..50c989c821 100644 --- a/test/units/plugins/test_plugins.py +++ b/test/units/plugins/test_plugins.py @@ -22,8 +22,9 @@ __metaclass__ = type import os -from ansible.compat.tests import BUILTINS, unittest -from ansible.compat.tests.mock import mock_open, patch, MagicMock +from units.compat import unittest +from units.compat.builtins import BUILTINS +from units.compat.mock import mock_open, patch, MagicMock from ansible.plugins.loader import MODULE_CACHE, PATH_CACHE, PLUGIN_PATH_CACHE, PluginLoader diff --git a/test/units/template/test_safe_eval.py b/test/units/template/test_safe_eval.py index ee3673197f..091e59fb45 100644 --- a/test/units/template/test_safe_eval.py +++ b/test/units/template/test_safe_eval.py @@ -22,8 +22,8 @@ __metaclass__ = type import sys from collections import defaultdict -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.template.safe_eval import safe_eval diff --git a/test/units/template/test_templar.py b/test/units/template/test_templar.py index ce12a8f2cd..41783a04a4 100644 --- a/test/units/template/test_templar.py +++ b/test/units/template/test_templar.py @@ -21,8 +21,8 @@ __metaclass__ = type from jinja2.runtime import Context -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 import constants as C from ansible.errors import AnsibleError, AnsibleUndefinedVariable diff --git a/test/units/template/test_template_utilities.py b/test/units/template/test_template_utilities.py index 66ae2eb7bd..ad75572ed8 100644 --- a/test/units/template/test_template_utilities.py +++ b/test/units/template/test_template_utilities.py @@ -20,7 +20,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type import jinja2 -from ansible.compat.tests import unittest +from units.compat import unittest from ansible.template import _escape_backslashes, _count_newlines_from_end diff --git a/test/units/template/test_vars.py b/test/units/template/test_vars.py index 42945ba42a..74e6783925 100644 --- a/test/units/template/test_vars.py +++ b/test/units/template/test_vars.py @@ -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.template.vars import AnsibleJ2Vars diff --git a/test/units/utils/test_vars.py b/test/units/utils/test_vars.py index f5f1b10510..dc5a249039 100644 --- a/test/units/utils/test_vars.py +++ b/test/units/utils/test_vars.py @@ -22,7 +22,7 @@ __metaclass__ = type from collections import defaultdict -from ansible.compat.tests import mock, unittest +from units.compat import mock, unittest from ansible.errors import AnsibleError from ansible.utils.vars import combine_vars, merge_hash diff --git a/test/units/vars/test_variable_manager.py b/test/units/vars/test_variable_manager.py index bb92cc0a51..d20e5047fe 100644 --- a/test/units/vars/test_variable_manager.py +++ b/test/units/vars/test_variable_manager.py @@ -23,8 +23,8 @@ import os from collections import defaultdict -from ansible.compat.tests import unittest -from ansible.compat.tests.mock import MagicMock, mock_open, patch +from units.compat import unittest +from units.compat.mock import MagicMock, mock_open, patch from ansible.inventory.manager import InventoryManager from ansible.module_utils.six import iteritems from ansible.module_utils.six.moves import builtins