diff --git a/tests/sanity/ignore-2.17.txt b/tests/sanity/ignore-2.17.txt index 806c4c5fcf..39048d2718 100644 --- a/tests/sanity/ignore-2.17.txt +++ b/tests/sanity/ignore-2.17.txt @@ -10,6 +10,5 @@ plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt plugins/modules/udm_user.py import-3.12 # Uses deprecated stdlib library 'crypt' plugins/modules/xfconf.py validate-modules:return-syntax-error plugins/module_utils/univention_umc.py pylint:use-yield-from # suggested construct does not work with Python 2 -tests/unit/compat/mock.py pylint:use-yield-from # suggested construct does not work with Python 2 tests/unit/plugins/modules/helper.py pylint:use-yield-from # suggested construct does not work with Python 2 tests/unit/plugins/modules/test_gio_mime.yaml no-smart-quotes diff --git a/tests/sanity/ignore-2.18.txt b/tests/sanity/ignore-2.18.txt index 806c4c5fcf..39048d2718 100644 --- a/tests/sanity/ignore-2.18.txt +++ b/tests/sanity/ignore-2.18.txt @@ -10,6 +10,5 @@ plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt plugins/modules/udm_user.py import-3.12 # Uses deprecated stdlib library 'crypt' plugins/modules/xfconf.py validate-modules:return-syntax-error plugins/module_utils/univention_umc.py pylint:use-yield-from # suggested construct does not work with Python 2 -tests/unit/compat/mock.py pylint:use-yield-from # suggested construct does not work with Python 2 tests/unit/plugins/modules/helper.py pylint:use-yield-from # suggested construct does not work with Python 2 tests/unit/plugins/modules/test_gio_mime.yaml no-smart-quotes diff --git a/tests/sanity/ignore-2.19.txt b/tests/sanity/ignore-2.19.txt index 806c4c5fcf..39048d2718 100644 --- a/tests/sanity/ignore-2.19.txt +++ b/tests/sanity/ignore-2.19.txt @@ -10,6 +10,5 @@ plugins/modules/udm_user.py import-3.11 # Uses deprecated stdlib library 'crypt plugins/modules/udm_user.py import-3.12 # Uses deprecated stdlib library 'crypt' plugins/modules/xfconf.py validate-modules:return-syntax-error plugins/module_utils/univention_umc.py pylint:use-yield-from # suggested construct does not work with Python 2 -tests/unit/compat/mock.py pylint:use-yield-from # suggested construct does not work with Python 2 tests/unit/plugins/modules/helper.py pylint:use-yield-from # suggested construct does not work with Python 2 tests/unit/plugins/modules/test_gio_mime.yaml no-smart-quotes diff --git a/tests/unit/compat/__init__.py b/tests/unit/compat/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/unit/compat/builtins.py b/tests/unit/compat/builtins.py deleted file mode 100644 index d548601d46..0000000000 --- a/tests/unit/compat/builtins.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) 2014, Toshio Kuratomi -# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later - -# Make coding more python3-ish -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - -# -# Compat for python2.7 -# - -# One unittest needs to import builtins via __import__() so we need to have -# the string that represents it -try: - import __builtin__ # noqa: F401, pylint: disable=unused-import -except ImportError: - BUILTINS = 'builtins' -else: - BUILTINS = '__builtin__' diff --git a/tests/unit/compat/mock.py b/tests/unit/compat/mock.py deleted file mode 100644 index bdbea945e6..0000000000 --- a/tests/unit/compat/mock.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright (c) 2014, Toshio Kuratomi -# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later - -# Make coding more python3-ish -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - -''' -Compat module for Python3.x's unittest.mock module -''' -import sys - -# Python 2.7 - -# Note: Could use the pypi mock library on python3.x as well as python2.x. It -# is the same as the python3 stdlib mock library - -try: - # Allow wildcard import because we really do want to import all of mock's - # symbols into this compat shim - # pylint: disable=wildcard-import,unused-wildcard-import - from unittest.mock import * # noqa: F401, pylint: disable=unused-import -except ImportError: - # Python 2 - # pylint: disable=wildcard-import,unused-wildcard-import - try: - from mock import * # noqa: F401, pylint: disable=unused-import - except ImportError: - print('You need the mock library installed on python2.x to run tests') - - -# Prior to 3.4.4, mock_open cannot handle binary read_data -if sys.version_info >= (3,) and sys.version_info < (3, 4, 4): - file_spec = None - - def _iterate_read_data(read_data): - # Helper for mock_open: - # Retrieve lines from read_data via a generator so that separate calls to - # readline, read, and readlines are properly interleaved - sep = b'\n' if isinstance(read_data, bytes) else '\n' - data_as_list = [l + sep for l in read_data.split(sep)] - - if data_as_list[-1] == sep: - # If the last line ended in a newline, the list comprehension will have an - # extra entry that's just a newline. Remove this. - data_as_list = data_as_list[:-1] - else: - # If there wasn't an extra newline by itself, then the file being - # emulated doesn't have a newline to end the last line remove the - # newline that our naive format() added - data_as_list[-1] = data_as_list[-1][:-1] - - for line in data_as_list: - yield line - - def mock_open(mock=None, read_data=''): - """ - A helper function to create a mock to replace the use of `open`. It works - for `open` called directly or used as a context manager. - - The `mock` argument is the mock object to configure. If `None` (the - default) then a `MagicMock` will be created for you, with the API limited - to methods or attributes available on standard file handles. - - `read_data` is a string for the `read` methoddline`, and `readlines` of the - file handle to return. This is an empty string by default. - """ - def _readlines_side_effect(*args, **kwargs): - if handle.readlines.return_value is not None: - return handle.readlines.return_value - return list(_data) - - def _read_side_effect(*args, **kwargs): - if handle.read.return_value is not None: - return handle.read.return_value - return type(read_data)().join(_data) - - def _readline_side_effect(): - if handle.readline.return_value is not None: - while True: - yield handle.readline.return_value - for line in _data: - yield line - - global file_spec - if file_spec is None: - import _io - file_spec = list(set(dir(_io.TextIOWrapper)).union(set(dir(_io.BytesIO)))) - - if mock is None: - mock = MagicMock(name='open', spec=open) - - handle = MagicMock(spec=file_spec) - handle.__enter__.return_value = handle - - _data = _iterate_read_data(read_data) - - handle.write.return_value = None - handle.read.return_value = None - handle.readline.return_value = None - handle.readlines.return_value = None - - handle.read.side_effect = _read_side_effect - handle.readline.side_effect = _readline_side_effect() - handle.readlines.side_effect = _readlines_side_effect - - mock.return_value = handle - return mock diff --git a/tests/unit/compat/unittest.py b/tests/unit/compat/unittest.py deleted file mode 100644 index d50bab86f0..0000000000 --- a/tests/unit/compat/unittest.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) 2014, Toshio Kuratomi -# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later - -# Make coding more python3-ish -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - -''' -Compat module for Python2.7's unittest module -''' - -import sys - -# Allow wildcard import because we really do want to import all of -# unittests's symbols into this compat shim -# pylint: disable=wildcard-import,unused-wildcard-import -if sys.version_info < (2, 7): - try: - # Need unittest2 on python2.6 - from unittest2 import * # noqa: F401, pylint: disable=unused-import - except ImportError: - print('You need unittest2 installed on python2.6.x to run tests') -else: - from unittest import * # noqa: F401, pylint: disable=unused-import diff --git a/tests/unit/mock/path.py b/tests/unit/mock/path.py deleted file mode 100644 index 62ae023431..0000000000 --- a/tests/unit/mock/path.py +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) Ansible Project -# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later - -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - -from ansible_collections.community.general.tests.unit.compat.mock import MagicMock -from ansible.utils.path import unfrackpath - - -mock_unfrackpath_noop = MagicMock(spec_set=unfrackpath, side_effect=lambda x, *args, **kwargs: x) diff --git a/tests/unit/mock/procenv.py b/tests/unit/mock/procenv.py deleted file mode 100644 index 4646d7f355..0000000000 --- a/tests/unit/mock/procenv.py +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright (c) 2016, Matt Davis -# Copyright (c) 2016, Toshio Kuratomi -# -# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later - -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - -import sys -import json - -from contextlib import contextmanager -from io import BytesIO, StringIO -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible.module_utils.six import PY3 -from ansible.module_utils.common.text.converters import to_bytes - - -@contextmanager -def swap_stdin_and_argv(stdin_data='', argv_data=tuple()): - """ - context manager that temporarily masks the test runner's values for stdin and argv - """ - real_stdin = sys.stdin - real_argv = sys.argv - - if PY3: - fake_stream = StringIO(stdin_data) - fake_stream.buffer = BytesIO(to_bytes(stdin_data)) - else: - fake_stream = BytesIO(to_bytes(stdin_data)) - - try: - sys.stdin = fake_stream - sys.argv = argv_data - - yield - finally: - sys.stdin = real_stdin - sys.argv = real_argv - - -@contextmanager -def swap_stdout(): - """ - context manager that temporarily replaces stdout for tests that need to verify output - """ - old_stdout = sys.stdout - - if PY3: - fake_stream = StringIO() - else: - fake_stream = BytesIO() - - try: - sys.stdout = fake_stream - - yield fake_stream - finally: - sys.stdout = old_stdout - - -class ModuleTestCase(unittest.TestCase): - def setUp(self, module_args=None): - if module_args is None: - module_args = {'_ansible_remote_tmp': '/tmp', '_ansible_keep_remote_files': False} - - args = json.dumps(dict(ANSIBLE_MODULE_ARGS=module_args)) - - # unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually - self.stdin_swap = swap_stdin_and_argv(stdin_data=args) - self.stdin_swap.__enter__() - - def tearDown(self): - # unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually - self.stdin_swap.__exit__(None, None, None) diff --git a/tests/unit/mock/vault_helper.py b/tests/unit/mock/vault_helper.py deleted file mode 100644 index 2b116129f5..0000000000 --- a/tests/unit/mock/vault_helper.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) Ansible project -# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later - -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - -from ansible.module_utils.common.text.converters import to_bytes - -from ansible.parsing.vault import VaultSecret - - -class TextVaultSecret(VaultSecret): - '''A secret piece of text. ie, a password. Tracks text encoding. - - The text encoding of the text may not be the default text encoding so - we keep track of the encoding so we encode it to the same bytes.''' - - def __init__(self, text, encoding=None, errors=None, _bytes=None): - super(TextVaultSecret, self).__init__() - self.text = text - self.encoding = encoding or 'utf-8' - self._bytes = _bytes - self.errors = errors or 'strict' - - @property - def bytes(self): - '''The text encoded with encoding, unless we specifically set _bytes.''' - return self._bytes or to_bytes(self.text, encoding=self.encoding, errors=self.errors) diff --git a/tests/unit/mock/yaml_helper.py b/tests/unit/mock/yaml_helper.py deleted file mode 100644 index ce1bd719b8..0000000000 --- a/tests/unit/mock/yaml_helper.py +++ /dev/null @@ -1,128 +0,0 @@ -# Copyright (c) Ansible project -# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later - -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - -import io -import yaml - -from ansible.module_utils.six import PY3 -from ansible.parsing.yaml.loader import AnsibleLoader -from ansible.parsing.yaml.dumper import AnsibleDumper - - -class YamlTestUtils(object): - """Mixin class to combine with a unittest.TestCase subclass.""" - def _loader(self, stream): - """Vault related tests will want to override this. - - Vault cases should setup a AnsibleLoader that has the vault password.""" - return AnsibleLoader(stream) - - def _dump_stream(self, obj, stream, dumper=None): - """Dump to a py2-unicode or py3-string stream.""" - if PY3: - return yaml.dump(obj, stream, Dumper=dumper) - else: - return yaml.dump(obj, stream, Dumper=dumper, encoding=None) - - def _dump_string(self, obj, dumper=None): - """Dump to a py2-unicode or py3-string""" - if PY3: - return yaml.dump(obj, Dumper=dumper) - else: - return yaml.dump(obj, Dumper=dumper, encoding=None) - - def _dump_load_cycle(self, obj): - # Each pass though a dump or load revs the 'generation' - # obj to yaml string - string_from_object_dump = self._dump_string(obj, dumper=AnsibleDumper) - - # wrap a stream/file like StringIO around that yaml - stream_from_object_dump = io.StringIO(string_from_object_dump) - loader = self._loader(stream_from_object_dump) - # load the yaml stream to create a new instance of the object (gen 2) - obj_2 = loader.get_data() - - # dump the gen 2 objects directory to strings - string_from_object_dump_2 = self._dump_string(obj_2, - dumper=AnsibleDumper) - - # The gen 1 and gen 2 yaml strings - self.assertEqual(string_from_object_dump, string_from_object_dump_2) - # the gen 1 (orig) and gen 2 py object - self.assertEqual(obj, obj_2) - - # again! gen 3... load strings into py objects - stream_3 = io.StringIO(string_from_object_dump_2) - loader_3 = self._loader(stream_3) - obj_3 = loader_3.get_data() - - string_from_object_dump_3 = self._dump_string(obj_3, dumper=AnsibleDumper) - - self.assertEqual(obj, obj_3) - # should be transitive, but... - self.assertEqual(obj_2, obj_3) - self.assertEqual(string_from_object_dump, string_from_object_dump_3) - - def _old_dump_load_cycle(self, obj): - '''Dump the passed in object to yaml, load it back up, dump again, compare.''' - stream = io.StringIO() - - yaml_string = self._dump_string(obj, dumper=AnsibleDumper) - self._dump_stream(obj, stream, dumper=AnsibleDumper) - - yaml_string_from_stream = stream.getvalue() - - # reset stream - stream.seek(0) - - loader = self._loader(stream) - # loader = AnsibleLoader(stream, vault_password=self.vault_password) - obj_from_stream = loader.get_data() - - stream_from_string = io.StringIO(yaml_string) - loader2 = self._loader(stream_from_string) - # loader2 = AnsibleLoader(stream_from_string, vault_password=self.vault_password) - obj_from_string = loader2.get_data() - - stream_obj_from_stream = io.StringIO() - stream_obj_from_string = io.StringIO() - - if PY3: - yaml.dump(obj_from_stream, stream_obj_from_stream, Dumper=AnsibleDumper) - yaml.dump(obj_from_stream, stream_obj_from_string, Dumper=AnsibleDumper) - else: - yaml.dump(obj_from_stream, stream_obj_from_stream, Dumper=AnsibleDumper, encoding=None) - yaml.dump(obj_from_stream, stream_obj_from_string, Dumper=AnsibleDumper, encoding=None) - - yaml_string_stream_obj_from_stream = stream_obj_from_stream.getvalue() - yaml_string_stream_obj_from_string = stream_obj_from_string.getvalue() - - stream_obj_from_stream.seek(0) - stream_obj_from_string.seek(0) - - if PY3: - yaml_string_obj_from_stream = yaml.dump(obj_from_stream, Dumper=AnsibleDumper) - yaml_string_obj_from_string = yaml.dump(obj_from_string, Dumper=AnsibleDumper) - else: - yaml_string_obj_from_stream = yaml.dump(obj_from_stream, Dumper=AnsibleDumper, encoding=None) - yaml_string_obj_from_string = yaml.dump(obj_from_string, Dumper=AnsibleDumper, encoding=None) - - assert yaml_string == yaml_string_obj_from_stream - assert yaml_string == yaml_string_obj_from_stream == yaml_string_obj_from_string - assert (yaml_string == yaml_string_obj_from_stream == yaml_string_obj_from_string == yaml_string_stream_obj_from_stream == - yaml_string_stream_obj_from_string) - assert obj == obj_from_stream - assert obj == obj_from_string - assert obj == yaml_string_obj_from_stream - assert obj == yaml_string_obj_from_string - assert obj == obj_from_stream == obj_from_string == yaml_string_obj_from_stream == yaml_string_obj_from_string - return {'obj': obj, - 'yaml_string': yaml_string, - 'yaml_string_from_stream': yaml_string_from_stream, - 'obj_from_stream': obj_from_stream, - 'obj_from_string': obj_from_string, - 'yaml_string_obj_from_string': yaml_string_obj_from_string} diff --git a/tests/unit/plugins/callback/test_elastic.py b/tests/unit/plugins/callback/test_elastic.py index 73f4a6c27c..e90186789b 100644 --- a/tests/unit/plugins/callback/test_elastic.py +++ b/tests/unit/plugins/callback/test_elastic.py @@ -7,8 +7,8 @@ __metaclass__ = type from ansible.playbook.task import Task from ansible.executor.task_result import TaskResult -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock, Mock +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch, MagicMock, Mock from ansible_collections.community.general.plugins.callback.elastic import ElasticSource, TaskData from collections import OrderedDict import sys diff --git a/tests/unit/plugins/callback/test_loganalytics.py b/tests/unit/plugins/callback/test_loganalytics.py index 4d7c2c9db9..6106a9885b 100644 --- a/tests/unit/plugins/callback/test_loganalytics.py +++ b/tests/unit/plugins/callback/test_loganalytics.py @@ -6,8 +6,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.executor.task_result import TaskResult -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch, Mock +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch, Mock from ansible_collections.community.general.plugins.callback.loganalytics import AzureLogAnalyticsSource from datetime import datetime diff --git a/tests/unit/plugins/callback/test_opentelemetry.py b/tests/unit/plugins/callback/test_opentelemetry.py index dea2e29d41..682a051efb 100644 --- a/tests/unit/plugins/callback/test_opentelemetry.py +++ b/tests/unit/plugins/callback/test_opentelemetry.py @@ -8,8 +8,8 @@ __metaclass__ = type from ansible.playbook.task import Task from ansible.executor.task_result import TaskResult -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock, Mock +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch, MagicMock, Mock from ansible_collections.community.general.plugins.callback.opentelemetry import OpenTelemetrySource, TaskData from collections import OrderedDict import sys diff --git a/tests/unit/plugins/callback/test_splunk.py b/tests/unit/plugins/callback/test_splunk.py index c09540fc00..09c56930f7 100644 --- a/tests/unit/plugins/callback/test_splunk.py +++ b/tests/unit/plugins/callback/test_splunk.py @@ -6,8 +6,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.executor.task_result import TaskResult -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch, Mock +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch, Mock from ansible_collections.community.general.plugins.callback.splunk import SplunkHTTPCollectorSource from datetime import datetime diff --git a/tests/unit/plugins/connection/test_lxc.py b/tests/unit/plugins/connection/test_lxc.py index bebd42772a..5c8f187691 100644 --- a/tests/unit/plugins/connection/test_lxc.py +++ b/tests/unit/plugins/connection/test_lxc.py @@ -14,7 +14,7 @@ from io import StringIO from ansible.errors import AnsibleError from ansible.playbook.play_context import PlayContext from ansible.plugins.loader import connection_loader -from ansible_collections.community.general.tests.unit.compat import mock +from ansible_collections.community.internal_test_tools.tests.unit.compat import mock @pytest.fixture(autouse=True) diff --git a/tests/unit/plugins/filter/test_crc32.py b/tests/unit/plugins/filter/test_crc32.py index 8201045136..7ec581f91f 100644 --- a/tests/unit/plugins/filter/test_crc32.py +++ b/tests/unit/plugins/filter/test_crc32.py @@ -6,7 +6,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible_collections.community.general.plugins.filter.crc32 import crc32s diff --git a/tests/unit/plugins/inventory/test_opennebula.py b/tests/unit/plugins/inventory/test_opennebula.py index d30e3eb84c..87ec4314de 100644 --- a/tests/unit/plugins/inventory/test_opennebula.py +++ b/tests/unit/plugins/inventory/test_opennebula.py @@ -20,9 +20,9 @@ from ansible.inventory.data import InventoryData from ansible.inventory.manager import InventoryManager from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.internal_test_tools.tests.unit.mock.loader import DictDataLoader +from ansible_collections.community.internal_test_tools.tests.unit.mock.path import mock_unfrackpath_noop from ansible_collections.community.general.plugins.inventory.opennebula import InventoryModule -from ansible_collections.community.general.tests.unit.mock.path import mock_unfrackpath_noop original_exists = os.path.exists diff --git a/tests/unit/plugins/lookup/test_bitwarden.py b/tests/unit/plugins/lookup/test_bitwarden.py index 04cad8d6c8..c70715c8d0 100644 --- a/tests/unit/plugins/lookup/test_bitwarden.py +++ b/tests/unit/plugins/lookup/test_bitwarden.py @@ -7,8 +7,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type import re -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible.errors import AnsibleError from ansible.module_utils import six diff --git a/tests/unit/plugins/lookup/test_bitwarden_secrets_manager.py b/tests/unit/plugins/lookup/test_bitwarden_secrets_manager.py index 5d2abeffa8..c2f8b0a5e5 100644 --- a/tests/unit/plugins/lookup/test_bitwarden_secrets_manager.py +++ b/tests/unit/plugins/lookup/test_bitwarden_secrets_manager.py @@ -8,8 +8,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type import json -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible.errors import AnsibleLookupError from ansible.plugins.loader import lookup_loader diff --git a/tests/unit/plugins/lookup/test_dsv.py b/tests/unit/plugins/lookup/test_dsv.py index a9a2d30ee6..fb23a74548 100644 --- a/tests/unit/plugins/lookup/test_dsv.py +++ b/tests/unit/plugins/lookup/test_dsv.py @@ -8,8 +8,8 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat.unittest import TestCase -from ansible_collections.community.general.tests.unit.compat.mock import ( +from ansible_collections.community.internal_test_tools.tests.unit.compat.unittest import TestCase +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import ( patch, MagicMock, ) diff --git a/tests/unit/plugins/lookup/test_etcd3.py b/tests/unit/plugins/lookup/test_etcd3.py index e9ac777ebe..62061620e9 100644 --- a/tests/unit/plugins/lookup/test_etcd3.py +++ b/tests/unit/plugins/lookup/test_etcd3.py @@ -8,8 +8,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch, MagicMock from ansible_collections.community.general.plugins.lookup import etcd3 from ansible.plugins.loader import lookup_loader diff --git a/tests/unit/plugins/lookup/test_github_app_access_token.py b/tests/unit/plugins/lookup/test_github_app_access_token.py index 4bf9c7e704..4a4187e1c6 100644 --- a/tests/unit/plugins/lookup/test_github_app_access_token.py +++ b/tests/unit/plugins/lookup/test_github_app_access_token.py @@ -7,8 +7,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type import json -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import ( +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import ( patch, MagicMock, mock_open diff --git a/tests/unit/plugins/lookup/test_lastpass.py b/tests/unit/plugins/lookup/test_lastpass.py index 5f65c9f633..fd38928c94 100644 --- a/tests/unit/plugins/lookup/test_lastpass.py +++ b/tests/unit/plugins/lookup/test_lastpass.py @@ -8,8 +8,8 @@ __metaclass__ = type from argparse import ArgumentParser -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible.errors import AnsibleError from ansible.module_utils import six diff --git a/tests/unit/plugins/lookup/test_manifold.py b/tests/unit/plugins/lookup/test_manifold.py index 4fa3562763..e8e63c9227 100644 --- a/tests/unit/plugins/lookup/test_manifold.py +++ b/tests/unit/plugins/lookup/test_manifold.py @@ -5,8 +5,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch, call +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch, call from ansible.errors import AnsibleError from ansible.module_utils.urls import ConnectionError, SSLValidationError from ansible.module_utils.six.moves.urllib.error import HTTPError, URLError diff --git a/tests/unit/plugins/lookup/test_merge_variables.py b/tests/unit/plugins/lookup/test_merge_variables.py index 8c4fb169cf..c8b0ca6fab 100644 --- a/tests/unit/plugins/lookup/test_merge_variables.py +++ b/tests/unit/plugins/lookup/test_merge_variables.py @@ -6,8 +6,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.mock.loader import DictDataLoader from ansible.plugins import AnsiblePlugin diff --git a/tests/unit/plugins/lookup/test_revbitspss.py b/tests/unit/plugins/lookup/test_revbitspss.py index 5109992068..9f1372e49c 100644 --- a/tests/unit/plugins/lookup/test_revbitspss.py +++ b/tests/unit/plugins/lookup/test_revbitspss.py @@ -6,8 +6,8 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat.unittest import TestCase -from ansible_collections.community.general.tests.unit.compat.mock import ( +from ansible_collections.community.internal_test_tools.tests.unit.compat.unittest import TestCase +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import ( patch, MagicMock, ) diff --git a/tests/unit/plugins/lookup/test_tss.py b/tests/unit/plugins/lookup/test_tss.py index 47ca79a697..28027d3177 100644 --- a/tests/unit/plugins/lookup/test_tss.py +++ b/tests/unit/plugins/lookup/test_tss.py @@ -8,8 +8,8 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat.unittest import TestCase -from ansible_collections.community.general.tests.unit.compat.mock import ( +from ansible_collections.community.internal_test_tools.tests.unit.compat.unittest import TestCase +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import ( patch, DEFAULT, MagicMock, diff --git a/tests/unit/plugins/module_utils/cloud/test_backoff.py b/tests/unit/plugins/module_utils/cloud/test_backoff.py index 5a5188669a..e06f65af72 100644 --- a/tests/unit/plugins/module_utils/cloud/test_backoff.py +++ b/tests/unit/plugins/module_utils/cloud/test_backoff.py @@ -7,7 +7,7 @@ __metaclass__ = type import random -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible_collections.community.general.plugins.module_utils.cloud import _exponential_backoff, \ _full_jitter_backoff diff --git a/tests/unit/plugins/module_utils/cloud/test_scaleway.py b/tests/unit/plugins/module_utils/cloud/test_scaleway.py index dc53bc1261..1052783884 100644 --- a/tests/unit/plugins/module_utils/cloud/test_scaleway.py +++ b/tests/unit/plugins/module_utils/cloud/test_scaleway.py @@ -5,7 +5,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible_collections.community.general.plugins.module_utils.scaleway import SecretVariables, argon2 diff --git a/tests/unit/plugins/module_utils/hwc/test_dict_comparison.py b/tests/unit/plugins/module_utils/hwc/test_dict_comparison.py index 037305d3f9..4f6358ace5 100644 --- a/tests/unit/plugins/module_utils/hwc/test_dict_comparison.py +++ b/tests/unit/plugins/module_utils/hwc/test_dict_comparison.py @@ -9,7 +9,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible_collections.community.general.plugins.module_utils.hwc_utils import are_different_dicts diff --git a/tests/unit/plugins/module_utils/hwc/test_hwc_utils.py b/tests/unit/plugins/module_utils/hwc/test_hwc_utils.py index 9b0be0bb48..6567bf576b 100644 --- a/tests/unit/plugins/module_utils/hwc/test_hwc_utils.py +++ b/tests/unit/plugins/module_utils/hwc/test_hwc_utils.py @@ -8,7 +8,7 @@ __metaclass__ = type import sys -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible_collections.community.general.plugins.module_utils.hwc_utils import (HwcModuleException, navigate_value) diff --git a/tests/unit/plugins/module_utils/test_cmd_runner.py b/tests/unit/plugins/module_utils/test_cmd_runner.py index da93292197..f59dad7e38 100644 --- a/tests/unit/plugins/module_utils/test_cmd_runner.py +++ b/tests/unit/plugins/module_utils/test_cmd_runner.py @@ -11,7 +11,7 @@ from functools import partial import pytest -from ansible_collections.community.general.tests.unit.compat.mock import MagicMock, PropertyMock +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import MagicMock, PropertyMock from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt diff --git a/tests/unit/plugins/module_utils/test_ocapi_utils.py b/tests/unit/plugins/module_utils/test_ocapi_utils.py index 3c939b5586..70ab16786c 100644 --- a/tests/unit/plugins/module_utils/test_ocapi_utils.py +++ b/tests/unit/plugins/module_utils/test_ocapi_utils.py @@ -11,7 +11,7 @@ import re import shutil import tempfile -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible_collections.community.general.plugins.module_utils.ocapi_utils import OcapiUtils diff --git a/tests/unit/plugins/module_utils/test_python_runner.py b/tests/unit/plugins/module_utils/test_python_runner.py index 8572ee7d78..024d203c04 100644 --- a/tests/unit/plugins/module_utils/test_python_runner.py +++ b/tests/unit/plugins/module_utils/test_python_runner.py @@ -10,7 +10,7 @@ import os import pytest -from ansible_collections.community.general.tests.unit.compat.mock import MagicMock, PropertyMock +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import MagicMock, PropertyMock from ansible_collections.community.general.plugins.module_utils.cmd_runner import cmd_runner_fmt from ansible_collections.community.general.plugins.module_utils.python_runner import PythonRunner diff --git a/tests/unit/plugins/modules/gitlab.py b/tests/unit/plugins/modules/gitlab.py index 7a52dc3552..d388a5c66b 100644 --- a/tests/unit/plugins/modules/gitlab.py +++ b/tests/unit/plugins/modules/gitlab.py @@ -12,7 +12,7 @@ import sys from httmock import response # noqa from httmock import urlmatch # noqa -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest import gitlab diff --git a/tests/unit/plugins/modules/interfaces_file/test_interfaces_file.py b/tests/unit/plugins/modules/interfaces_file/test_interfaces_file.py index 94e10b75f2..bc64f9ed8e 100644 --- a/tests/unit/plugins/modules/interfaces_file/test_interfaces_file.py +++ b/tests/unit/plugins/modules/interfaces_file/test_interfaces_file.py @@ -8,7 +8,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible_collections.community.general.plugins.modules import interfaces_file from shutil import copyfile, move import difflib diff --git a/tests/unit/plugins/modules/oneview_module_loader.py b/tests/unit/plugins/modules/oneview_module_loader.py index ae62d9ced1..52ca4f7b9d 100644 --- a/tests/unit/plugins/modules/oneview_module_loader.py +++ b/tests/unit/plugins/modules/oneview_module_loader.py @@ -6,7 +6,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type import sys -from ansible_collections.community.general.tests.unit.compat.mock import Mock +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import Mock # FIXME: These should be done inside of a fixture so that they're only mocked during # these unittests diff --git a/tests/unit/plugins/modules/test_alerta_customer.py b/tests/unit/plugins/modules/test_alerta_customer.py index 8cf7e05826..f8c8b7c889 100644 --- a/tests/unit/plugins/modules/test_alerta_customer.py +++ b/tests/unit/plugins/modules/test_alerta_customer.py @@ -7,7 +7,7 @@ __metaclass__ = type import json import pytest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.general.plugins.modules import alerta_customer from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/test_apk.py b/tests/unit/plugins/modules/test_apk.py index c952456eff..b25d10f207 100644 --- a/tests/unit/plugins/modules/test_apk.py +++ b/tests/unit/plugins/modules/test_apk.py @@ -5,8 +5,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import mock -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import mock +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible_collections.community.general.plugins.modules import apk diff --git a/tests/unit/plugins/modules/test_archive.py b/tests/unit/plugins/modules/test_archive.py index 48e13c6a57..39f4ba6afd 100644 --- a/tests/unit/plugins/modules/test_archive.py +++ b/tests/unit/plugins/modules/test_archive.py @@ -9,7 +9,7 @@ __metaclass__ = type import pytest from ansible.module_utils.basic import AnsibleModule -from ansible_collections.community.general.tests.unit.compat.mock import Mock, patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import Mock, patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules.archive import get_archive, common_path diff --git a/tests/unit/plugins/modules/test_bitbucket_access_key.py b/tests/unit/plugins/modules/test_bitbucket_access_key.py index 1fdd7cef33..3b08b2bbbd 100644 --- a/tests/unit/plugins/modules/test_bitbucket_access_key.py +++ b/tests/unit/plugins/modules/test_bitbucket_access_key.py @@ -7,8 +7,8 @@ __metaclass__ = type from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper from ansible_collections.community.general.plugins.modules import bitbucket_access_key -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleFailJson, AnsibleExitJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/test_bitbucket_pipeline_key_pair.py b/tests/unit/plugins/modules/test_bitbucket_pipeline_key_pair.py index c81d2970aa..68ded936ab 100644 --- a/tests/unit/plugins/modules/test_bitbucket_pipeline_key_pair.py +++ b/tests/unit/plugins/modules/test_bitbucket_pipeline_key_pair.py @@ -7,8 +7,8 @@ __metaclass__ = type from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper from ansible_collections.community.general.plugins.modules import bitbucket_pipeline_key_pair -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleFailJson, AnsibleExitJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/test_bitbucket_pipeline_known_host.py b/tests/unit/plugins/modules/test_bitbucket_pipeline_known_host.py index 4a24431f94..828ae00661 100644 --- a/tests/unit/plugins/modules/test_bitbucket_pipeline_known_host.py +++ b/tests/unit/plugins/modules/test_bitbucket_pipeline_known_host.py @@ -10,8 +10,8 @@ import pytest from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper from ansible_collections.community.general.plugins.modules import bitbucket_pipeline_known_host from ansible_collections.community.general.plugins.modules.bitbucket_pipeline_known_host import HAS_PARAMIKO -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/test_bitbucket_pipeline_variable.py b/tests/unit/plugins/modules/test_bitbucket_pipeline_variable.py index ea73246917..47c77b2b0b 100644 --- a/tests/unit/plugins/modules/test_bitbucket_pipeline_variable.py +++ b/tests/unit/plugins/modules/test_bitbucket_pipeline_variable.py @@ -7,8 +7,8 @@ __metaclass__ = type from ansible_collections.community.general.plugins.module_utils.source_control.bitbucket import BitbucketHelper from ansible_collections.community.general.plugins.modules import bitbucket_pipeline_variable -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleFailJson, AnsibleExitJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/test_bootc_manage.py b/tests/unit/plugins/modules/test_bootc_manage.py index b0fed302c7..481fd8feaf 100644 --- a/tests/unit/plugins/modules/test_bootc_manage.py +++ b/tests/unit/plugins/modules/test_bootc_manage.py @@ -5,7 +5,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.general.plugins.modules import bootc_manage from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/test_campfire.py b/tests/unit/plugins/modules/test_campfire.py index afe0f5284c..797b2668bf 100644 --- a/tests/unit/plugins/modules/test_campfire.py +++ b/tests/unit/plugins/modules/test_campfire.py @@ -6,7 +6,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type import pytest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.general.plugins.modules import campfire from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/test_circonus_annotation.py b/tests/unit/plugins/modules/test_circonus_annotation.py index ffdd5f38c2..81feb8a7eb 100644 --- a/tests/unit/plugins/modules/test_circonus_annotation.py +++ b/tests/unit/plugins/modules/test_circonus_annotation.py @@ -12,7 +12,7 @@ import re import uuid from urllib3.response import HTTPResponse -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible.module_utils.common.text.converters import to_bytes from ansible_collections.community.general.plugins.modules import circonus_annotation from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/test_datadog_downtime.py b/tests/unit/plugins/modules/test_datadog_downtime.py index 0f2ad16b7b..a69e9986d5 100644 --- a/tests/unit/plugins/modules/test_datadog_downtime.py +++ b/tests/unit/plugins/modules/test_datadog_downtime.py @@ -8,7 +8,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.community.general.plugins.modules import datadog_downtime -from ansible_collections.community.general.tests.unit.compat.mock import MagicMock, patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import MagicMock, patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import ( AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args ) diff --git a/tests/unit/plugins/modules/test_discord.py b/tests/unit/plugins/modules/test_discord.py index 9375c123cb..e8ee8f78cd 100644 --- a/tests/unit/plugins/modules/test_discord.py +++ b/tests/unit/plugins/modules/test_discord.py @@ -7,7 +7,7 @@ __metaclass__ = type import json import pytest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.general.plugins.modules import discord from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/test_dnf_config_manager.py b/tests/unit/plugins/modules/test_dnf_config_manager.py index 790e5e96c9..9c0c0215a1 100644 --- a/tests/unit/plugins/modules/test_dnf_config_manager.py +++ b/tests/unit/plugins/modules/test_dnf_config_manager.py @@ -7,7 +7,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat.mock import patch, call +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch, call from ansible_collections.community.general.plugins.modules import dnf_config_manager as dnf_config_manager_module from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, \ ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/test_dnsimple.py b/tests/unit/plugins/modules/test_dnsimple.py index baff04f61d..e67a5abfd4 100644 --- a/tests/unit/plugins/modules/test_dnsimple.py +++ b/tests/unit/plugins/modules/test_dnsimple.py @@ -10,7 +10,7 @@ __metaclass__ = type from ansible_collections.community.general.plugins.modules import dnsimple as dnsimple_module from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleFailJson, ModuleTestCase, set_module_args -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch import pytest import sys diff --git a/tests/unit/plugins/modules/test_github_repo.py b/tests/unit/plugins/modules/test_github_repo.py index 10227aadfb..bbb1f624f4 100644 --- a/tests/unit/plugins/modules/test_github_repo.py +++ b/tests/unit/plugins/modules/test_github_repo.py @@ -9,7 +9,7 @@ import re import json import sys from httmock import with_httmock, urlmatch, response -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible_collections.community.general.plugins.modules import github_repo GITHUB_MINIMUM_PYTHON_VERSION = (2, 7) diff --git a/tests/unit/plugins/modules/test_homebrew.py b/tests/unit/plugins/modules/test_homebrew.py index d04ca4de58..2404c68721 100644 --- a/tests/unit/plugins/modules/test_homebrew.py +++ b/tests/unit/plugins/modules/test_homebrew.py @@ -6,7 +6,7 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible_collections.community.general.plugins.module_utils.homebrew import HomebrewValidate diff --git a/tests/unit/plugins/modules/test_icinga2_feature.py b/tests/unit/plugins/modules/test_icinga2_feature.py index 18b6181445..730cdc11f0 100644 --- a/tests/unit/plugins/modules/test_icinga2_feature.py +++ b/tests/unit/plugins/modules/test_icinga2_feature.py @@ -11,7 +11,7 @@ __metaclass__ = type from ansible_collections.community.general.plugins.modules import icinga2_feature from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible.module_utils import basic diff --git a/tests/unit/plugins/modules/test_ipa_getkeytab.py b/tests/unit/plugins/modules/test_ipa_getkeytab.py index d7f87c5a1b..467d87fff7 100644 --- a/tests/unit/plugins/modules/test_ipa_getkeytab.py +++ b/tests/unit/plugins/modules/test_ipa_getkeytab.py @@ -6,7 +6,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat.mock import call, patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import call, patch from ansible_collections.community.general.plugins.modules import ipa_getkeytab from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/test_ipa_otpconfig.py b/tests/unit/plugins/modules/test_ipa_otpconfig.py index c20bc0ecbb..df26babd0c 100644 --- a/tests/unit/plugins/modules/test_ipa_otpconfig.py +++ b/tests/unit/plugins/modules/test_ipa_otpconfig.py @@ -9,8 +9,8 @@ __metaclass__ = type from contextlib import contextmanager -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import call, patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import call, patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import ipa_otpconfig diff --git a/tests/unit/plugins/modules/test_ipa_otptoken.py b/tests/unit/plugins/modules/test_ipa_otptoken.py index ed70869fd2..36222f7601 100644 --- a/tests/unit/plugins/modules/test_ipa_otptoken.py +++ b/tests/unit/plugins/modules/test_ipa_otptoken.py @@ -9,8 +9,8 @@ __metaclass__ = type from contextlib import contextmanager -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import call, patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import call, patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import ipa_otptoken diff --git a/tests/unit/plugins/modules/test_ipa_pwpolicy.py b/tests/unit/plugins/modules/test_ipa_pwpolicy.py index 5d77fcfac1..3006312614 100644 --- a/tests/unit/plugins/modules/test_ipa_pwpolicy.py +++ b/tests/unit/plugins/modules/test_ipa_pwpolicy.py @@ -9,8 +9,8 @@ __metaclass__ = type from contextlib import contextmanager -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import call, patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import call, patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import ipa_pwpolicy diff --git a/tests/unit/plugins/modules/test_ipbase.py b/tests/unit/plugins/modules/test_ipbase.py index 8106889da1..6b2cc36b1b 100644 --- a/tests/unit/plugins/modules/test_ipbase.py +++ b/tests/unit/plugins/modules/test_ipbase.py @@ -9,8 +9,8 @@ __metaclass__ = type import json from ansible_collections.community.general.plugins.modules.ipbase_info import IpbaseInfo -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import Mock +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import Mock IPBASE_DATA = { diff --git a/tests/unit/plugins/modules/test_java_keystore.py b/tests/unit/plugins/modules/test_java_keystore.py index d2a2710093..a92cd69ef3 100644 --- a/tests/unit/plugins/modules/test_java_keystore.py +++ b/tests/unit/plugins/modules/test_java_keystore.py @@ -12,8 +12,8 @@ __metaclass__ = type import os from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import ModuleTestCase, set_module_args -from ansible_collections.community.general.tests.unit.compat.mock import patch -from ansible_collections.community.general.tests.unit.compat.mock import Mock +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import Mock from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.general.plugins.modules.java_keystore import JavaKeystore diff --git a/tests/unit/plugins/modules/test_jenkins_build.py b/tests/unit/plugins/modules/test_jenkins_build.py index e188754df3..1a91d4a5e9 100644 --- a/tests/unit/plugins/modules/test_jenkins_build.py +++ b/tests/unit/plugins/modules/test_jenkins_build.py @@ -5,8 +5,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible.module_utils import basic from ansible_collections.community.general.plugins.modules import jenkins_build from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import ( diff --git a/tests/unit/plugins/modules/test_jenkins_build_info.py b/tests/unit/plugins/modules/test_jenkins_build_info.py index 02412e68fd..7f80c8f631 100644 --- a/tests/unit/plugins/modules/test_jenkins_build_info.py +++ b/tests/unit/plugins/modules/test_jenkins_build_info.py @@ -5,8 +5,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible.module_utils import basic from ansible_collections.community.general.plugins.modules import jenkins_build_info from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import ( diff --git a/tests/unit/plugins/modules/test_keycloak_authentication.py b/tests/unit/plugins/modules/test_keycloak_authentication.py index c5459a12e3..89a44c919e 100644 --- a/tests/unit/plugins/modules/test_keycloak_authentication.py +++ b/tests/unit/plugins/modules/test_keycloak_authentication.py @@ -9,8 +9,8 @@ __metaclass__ = type from contextlib import contextmanager -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_authentication diff --git a/tests/unit/plugins/modules/test_keycloak_authentication_required_actions.py b/tests/unit/plugins/modules/test_keycloak_authentication_required_actions.py index aabf939597..86fb235357 100644 --- a/tests/unit/plugins/modules/test_keycloak_authentication_required_actions.py +++ b/tests/unit/plugins/modules/test_keycloak_authentication_required_actions.py @@ -9,8 +9,8 @@ __metaclass__ = type from contextlib import contextmanager -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_authentication_required_actions diff --git a/tests/unit/plugins/modules/test_keycloak_client.py b/tests/unit/plugins/modules/test_keycloak_client.py index 1c10cdb635..4f2572780b 100644 --- a/tests/unit/plugins/modules/test_keycloak_client.py +++ b/tests/unit/plugins/modules/test_keycloak_client.py @@ -10,8 +10,8 @@ __metaclass__ = type from contextlib import contextmanager -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_client diff --git a/tests/unit/plugins/modules/test_keycloak_client_rolemapping.py b/tests/unit/plugins/modules/test_keycloak_client_rolemapping.py index cdadb92204..b5679d22a0 100644 --- a/tests/unit/plugins/modules/test_keycloak_client_rolemapping.py +++ b/tests/unit/plugins/modules/test_keycloak_client_rolemapping.py @@ -9,8 +9,8 @@ __metaclass__ = type from contextlib import contextmanager -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_client_rolemapping diff --git a/tests/unit/plugins/modules/test_keycloak_clientscope.py b/tests/unit/plugins/modules/test_keycloak_clientscope.py index f8486f91db..261315c7fa 100644 --- a/tests/unit/plugins/modules/test_keycloak_clientscope.py +++ b/tests/unit/plugins/modules/test_keycloak_clientscope.py @@ -10,8 +10,8 @@ __metaclass__ = type from contextlib import contextmanager -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_clientscope diff --git a/tests/unit/plugins/modules/test_keycloak_identity_provider.py b/tests/unit/plugins/modules/test_keycloak_identity_provider.py index 7253d18c68..2f6cf738db 100644 --- a/tests/unit/plugins/modules/test_keycloak_identity_provider.py +++ b/tests/unit/plugins/modules/test_keycloak_identity_provider.py @@ -9,8 +9,8 @@ __metaclass__ = type from contextlib import contextmanager -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_identity_provider diff --git a/tests/unit/plugins/modules/test_keycloak_realm.py b/tests/unit/plugins/modules/test_keycloak_realm.py index 65cedfd0f7..e1d1759c21 100644 --- a/tests/unit/plugins/modules/test_keycloak_realm.py +++ b/tests/unit/plugins/modules/test_keycloak_realm.py @@ -9,8 +9,8 @@ __metaclass__ = type from contextlib import contextmanager -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_realm diff --git a/tests/unit/plugins/modules/test_keycloak_realm_info.py b/tests/unit/plugins/modules/test_keycloak_realm_info.py index 723071d6e2..7e9469b040 100644 --- a/tests/unit/plugins/modules/test_keycloak_realm_info.py +++ b/tests/unit/plugins/modules/test_keycloak_realm_info.py @@ -9,8 +9,8 @@ __metaclass__ = type from contextlib import contextmanager -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_realm_info diff --git a/tests/unit/plugins/modules/test_keycloak_realm_keys.py b/tests/unit/plugins/modules/test_keycloak_realm_keys.py index e1bfbe41a1..f6b7ae4432 100644 --- a/tests/unit/plugins/modules/test_keycloak_realm_keys.py +++ b/tests/unit/plugins/modules/test_keycloak_realm_keys.py @@ -9,8 +9,8 @@ __metaclass__ = type from contextlib import contextmanager -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_realm_key diff --git a/tests/unit/plugins/modules/test_keycloak_realm_keys_metadata_info.py b/tests/unit/plugins/modules/test_keycloak_realm_keys_metadata_info.py index 76d329939e..201f665d12 100644 --- a/tests/unit/plugins/modules/test_keycloak_realm_keys_metadata_info.py +++ b/tests/unit/plugins/modules/test_keycloak_realm_keys_metadata_info.py @@ -14,8 +14,8 @@ from itertools import count from ansible.module_utils.six import StringIO from ansible_collections.community.general.plugins.modules import \ keycloak_realm_keys_metadata_info -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import ( AnsibleExitJson, ModuleTestCase, set_module_args) diff --git a/tests/unit/plugins/modules/test_keycloak_role.py b/tests/unit/plugins/modules/test_keycloak_role.py index 3721b3622f..eebb6ca09c 100644 --- a/tests/unit/plugins/modules/test_keycloak_role.py +++ b/tests/unit/plugins/modules/test_keycloak_role.py @@ -9,8 +9,8 @@ __metaclass__ = type from contextlib import contextmanager -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_role diff --git a/tests/unit/plugins/modules/test_keycloak_user.py b/tests/unit/plugins/modules/test_keycloak_user.py index 8b4c1faa1f..729bb89e1f 100644 --- a/tests/unit/plugins/modules/test_keycloak_user.py +++ b/tests/unit/plugins/modules/test_keycloak_user.py @@ -10,8 +10,8 @@ __metaclass__ = type from contextlib import contextmanager -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_user diff --git a/tests/unit/plugins/modules/test_keycloak_user_federation.py b/tests/unit/plugins/modules/test_keycloak_user_federation.py index dd77ab6855..7ffddb7268 100644 --- a/tests/unit/plugins/modules/test_keycloak_user_federation.py +++ b/tests/unit/plugins/modules/test_keycloak_user_federation.py @@ -9,8 +9,8 @@ __metaclass__ = type from contextlib import contextmanager -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_user_federation diff --git a/tests/unit/plugins/modules/test_keycloak_userprofile.py b/tests/unit/plugins/modules/test_keycloak_userprofile.py index fce77795b1..b414949585 100644 --- a/tests/unit/plugins/modules/test_keycloak_userprofile.py +++ b/tests/unit/plugins/modules/test_keycloak_userprofile.py @@ -9,8 +9,8 @@ __metaclass__ = type from contextlib import contextmanager -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules import keycloak_userprofile diff --git a/tests/unit/plugins/modules/test_linode_v4.py b/tests/unit/plugins/modules/test_linode_v4.py index 9ef182b5ab..d4bcdf3243 100644 --- a/tests/unit/plugins/modules/test_linode_v4.py +++ b/tests/unit/plugins/modules/test_linode_v4.py @@ -23,7 +23,7 @@ from linode_api4 import LinodeClient from ansible_collections.community.general.plugins.modules import linode_v4 from ansible_collections.community.general.plugins.module_utils.linode import get_user_agent from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import set_module_args -from ansible_collections.community.general.tests.unit.compat import mock +from ansible_collections.community.internal_test_tools.tests.unit.compat import mock from .linode_conftest import access_token, no_access_token_in_env, default_args, mock_linode # noqa: F401, pylint: disable=unused-import diff --git a/tests/unit/plugins/modules/test_lvg_rename.py b/tests/unit/plugins/modules/test_lvg_rename.py index 00ba1c7f21..9cbaa2664a 100644 --- a/tests/unit/plugins/modules/test_lvg_rename.py +++ b/tests/unit/plugins/modules/test_lvg_rename.py @@ -7,7 +7,7 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type from ansible_collections.community.general.plugins.modules import lvg_rename -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import ( AnsibleFailJson, AnsibleExitJson, ModuleTestCase, set_module_args) diff --git a/tests/unit/plugins/modules/test_lxca_cmms.py b/tests/unit/plugins/modules/test_lxca_cmms.py index efbdad0620..888a6c8d52 100644 --- a/tests/unit/plugins/modules/test_lxca_cmms.py +++ b/tests/unit/plugins/modules/test_lxca_cmms.py @@ -8,7 +8,7 @@ __metaclass__ = type import json import pytest -from ansible_collections.community.general.tests.unit.compat import mock +from ansible_collections.community.internal_test_tools.tests.unit.compat import mock from ansible_collections.community.general.plugins.modules import lxca_cmms diff --git a/tests/unit/plugins/modules/test_lxca_nodes.py b/tests/unit/plugins/modules/test_lxca_nodes.py index 87effa0c01..98c8a551d4 100644 --- a/tests/unit/plugins/modules/test_lxca_nodes.py +++ b/tests/unit/plugins/modules/test_lxca_nodes.py @@ -8,7 +8,7 @@ __metaclass__ = type import json import pytest -from ansible_collections.community.general.tests.unit.compat import mock +from ansible_collections.community.internal_test_tools.tests.unit.compat import mock from ansible_collections.community.general.plugins.modules import lxca_nodes diff --git a/tests/unit/plugins/modules/test_modprobe.py b/tests/unit/plugins/modules/test_modprobe.py index f4c618241a..12f6af7273 100644 --- a/tests/unit/plugins/modules/test_modprobe.py +++ b/tests/unit/plugins/modules/test_modprobe.py @@ -8,9 +8,9 @@ __metaclass__ = type import sys from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import ModuleTestCase, set_module_args -from ansible_collections.community.general.tests.unit.compat.mock import patch -from ansible_collections.community.general.tests.unit.compat.mock import Mock -from ansible_collections.community.general.tests.unit.compat.mock import mock_open +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import Mock +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import mock_open from ansible_collections.community.general.plugins.modules.modprobe import Modprobe, build_module diff --git a/tests/unit/plugins/modules/test_monit.py b/tests/unit/plugins/modules/test_monit.py index f3a3a5685d..e50c8e387f 100644 --- a/tests/unit/plugins/modules/test_monit.py +++ b/tests/unit/plugins/modules/test_monit.py @@ -8,7 +8,7 @@ __metaclass__ = type import mock import pytest -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible_collections.community.general.plugins.modules import monit from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson diff --git a/tests/unit/plugins/modules/test_nomad_token.py b/tests/unit/plugins/modules/test_nomad_token.py index b312201166..43c1f82cf1 100644 --- a/tests/unit/plugins/modules/test_nomad_token.py +++ b/tests/unit/plugins/modules/test_nomad_token.py @@ -10,7 +10,7 @@ __metaclass__ = type import nomad from ansible_collections.community.general.plugins.modules import nomad_token -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/test_npm.py b/tests/unit/plugins/modules/test_npm.py index 2647e9eeab..63c854f563 100644 --- a/tests/unit/plugins/modules/test_npm.py +++ b/tests/unit/plugins/modules/test_npm.py @@ -6,7 +6,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat.mock import call, patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import call, patch from ansible_collections.community.general.plugins.modules import npm from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/test_ocapi_command.py b/tests/unit/plugins/modules/test_ocapi_command.py index 96c2127b99..5f8c3c85f8 100644 --- a/tests/unit/plugins/modules/test_ocapi_command.py +++ b/tests/unit/plugins/modules/test_ocapi_command.py @@ -10,8 +10,8 @@ import os import shutil import tempfile -from ansible_collections.community.general.tests.unit.compat.mock import patch -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible.module_utils import basic import ansible_collections.community.general.plugins.modules.ocapi_command as module from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson diff --git a/tests/unit/plugins/modules/test_ocapi_info.py b/tests/unit/plugins/modules/test_ocapi_info.py index f2570b6baf..a5213f64e1 100644 --- a/tests/unit/plugins/modules/test_ocapi_info.py +++ b/tests/unit/plugins/modules/test_ocapi_info.py @@ -6,8 +6,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat.mock import patch -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible.module_utils import basic import ansible_collections.community.general.plugins.modules.ocapi_info as module from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson diff --git a/tests/unit/plugins/modules/test_oneview_enclosure_info.py b/tests/unit/plugins/modules/test_oneview_enclosure_info.py index e8ef3449fb..aeb62f4a0f 100644 --- a/tests/unit/plugins/modules/test_oneview_enclosure_info.py +++ b/tests/unit/plugins/modules/test_oneview_enclosure_info.py @@ -7,7 +7,7 @@ __metaclass__ = type from .hpe_test_utils import FactsParamsTestCase -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible_collections.community.general.plugins.modules.oneview_enclosure_info import EnclosureInfoModule diff --git a/tests/unit/plugins/modules/test_oneview_ethernet_network.py b/tests/unit/plugins/modules/test_oneview_ethernet_network.py index f1398740ee..8854ccec44 100644 --- a/tests/unit/plugins/modules/test_oneview_ethernet_network.py +++ b/tests/unit/plugins/modules/test_oneview_ethernet_network.py @@ -9,7 +9,7 @@ __metaclass__ = type import yaml -from ansible_collections.community.general.tests.unit.compat import unittest, mock +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest, mock from .oneview_module_loader import EthernetNetworkModule from .hpe_test_utils import OneViewBaseTestCase diff --git a/tests/unit/plugins/modules/test_oneview_ethernet_network_info.py b/tests/unit/plugins/modules/test_oneview_ethernet_network_info.py index 4a2813e2f8..f010b7d46e 100644 --- a/tests/unit/plugins/modules/test_oneview_ethernet_network_info.py +++ b/tests/unit/plugins/modules/test_oneview_ethernet_network_info.py @@ -5,7 +5,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from .oneview_module_loader import EthernetNetworkInfoModule from .hpe_test_utils import FactsParamsTestCase diff --git a/tests/unit/plugins/modules/test_oneview_fc_network.py b/tests/unit/plugins/modules/test_oneview_fc_network.py index 6def80fc43..625ee6a948 100644 --- a/tests/unit/plugins/modules/test_oneview_fc_network.py +++ b/tests/unit/plugins/modules/test_oneview_fc_network.py @@ -7,7 +7,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from .oneview_module_loader import FcNetworkModule from .hpe_test_utils import OneViewBaseTestCase diff --git a/tests/unit/plugins/modules/test_oneview_fc_network_info.py b/tests/unit/plugins/modules/test_oneview_fc_network_info.py index 236ce136ad..22f5a073e5 100644 --- a/tests/unit/plugins/modules/test_oneview_fc_network_info.py +++ b/tests/unit/plugins/modules/test_oneview_fc_network_info.py @@ -5,7 +5,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from .oneview_module_loader import FcNetworkInfoModule from .hpe_test_utils import FactsParamsTestCase diff --git a/tests/unit/plugins/modules/test_oneview_fcoe_network.py b/tests/unit/plugins/modules/test_oneview_fcoe_network.py index 224e5471e9..d5c3f840cc 100644 --- a/tests/unit/plugins/modules/test_oneview_fcoe_network.py +++ b/tests/unit/plugins/modules/test_oneview_fcoe_network.py @@ -7,7 +7,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from .oneview_module_loader import FcoeNetworkModule from .hpe_test_utils import OneViewBaseTestCase diff --git a/tests/unit/plugins/modules/test_oneview_fcoe_network_info.py b/tests/unit/plugins/modules/test_oneview_fcoe_network_info.py index 387c1da3c1..d64ec8f58b 100644 --- a/tests/unit/plugins/modules/test_oneview_fcoe_network_info.py +++ b/tests/unit/plugins/modules/test_oneview_fcoe_network_info.py @@ -5,7 +5,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from .oneview_module_loader import FcoeNetworkInfoModule from .hpe_test_utils import FactsParamsTestCase diff --git a/tests/unit/plugins/modules/test_oneview_logical_interconnect_group.py b/tests/unit/plugins/modules/test_oneview_logical_interconnect_group.py index 1f941fb50f..a9ab0fc73d 100644 --- a/tests/unit/plugins/modules/test_oneview_logical_interconnect_group.py +++ b/tests/unit/plugins/modules/test_oneview_logical_interconnect_group.py @@ -7,7 +7,7 @@ __metaclass__ = type from copy import deepcopy -from ansible_collections.community.general.tests.unit.compat import unittest, mock +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest, mock from .hpe_test_utils import OneViewBaseTestCase from ansible_collections.community.general.plugins.modules.oneview_logical_interconnect_group import LogicalInterconnectGroupModule diff --git a/tests/unit/plugins/modules/test_oneview_logical_interconnect_group_info.py b/tests/unit/plugins/modules/test_oneview_logical_interconnect_group_info.py index 9fa602a8cf..b259a7d7e4 100644 --- a/tests/unit/plugins/modules/test_oneview_logical_interconnect_group_info.py +++ b/tests/unit/plugins/modules/test_oneview_logical_interconnect_group_info.py @@ -5,7 +5,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from .hpe_test_utils import FactsParamsTestCase from ansible_collections.community.general.plugins.modules.oneview_logical_interconnect_group_info import ( LogicalInterconnectGroupInfoModule diff --git a/tests/unit/plugins/modules/test_oneview_network_set.py b/tests/unit/plugins/modules/test_oneview_network_set.py index f801cd102a..43ec3c759c 100644 --- a/tests/unit/plugins/modules/test_oneview_network_set.py +++ b/tests/unit/plugins/modules/test_oneview_network_set.py @@ -5,7 +5,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest, mock +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest, mock from .hpe_test_utils import OneViewBaseTestCase from .oneview_module_loader import NetworkSetModule diff --git a/tests/unit/plugins/modules/test_oneview_network_set_info.py b/tests/unit/plugins/modules/test_oneview_network_set_info.py index 13cd0400a4..512ca0ff7e 100644 --- a/tests/unit/plugins/modules/test_oneview_network_set_info.py +++ b/tests/unit/plugins/modules/test_oneview_network_set_info.py @@ -5,7 +5,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from .oneview_module_loader import NetworkSetInfoModule from .hpe_test_utils import FactsParamsTestCase diff --git a/tests/unit/plugins/modules/test_oneview_san_manager.py b/tests/unit/plugins/modules/test_oneview_san_manager.py index d675c3b353..6ff3598248 100644 --- a/tests/unit/plugins/modules/test_oneview_san_manager.py +++ b/tests/unit/plugins/modules/test_oneview_san_manager.py @@ -5,7 +5,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest, mock +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest, mock from .oneview_module_loader import SanManagerModule from .hpe_test_utils import OneViewBaseTestCase from copy import deepcopy diff --git a/tests/unit/plugins/modules/test_oneview_san_manager_info.py b/tests/unit/plugins/modules/test_oneview_san_manager_info.py index be1f243161..3ba18a4a07 100644 --- a/tests/unit/plugins/modules/test_oneview_san_manager_info.py +++ b/tests/unit/plugins/modules/test_oneview_san_manager_info.py @@ -5,7 +5,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from .oneview_module_loader import SanManagerInfoModule from .hpe_test_utils import FactsParamsTestCase diff --git a/tests/unit/plugins/modules/test_pacman.py b/tests/unit/plugins/modules/test_pacman.py index feab8fc542..0928926856 100644 --- a/tests/unit/plugins/modules/test_pacman.py +++ b/tests/unit/plugins/modules/test_pacman.py @@ -8,7 +8,7 @@ __metaclass__ = type from ansible.module_utils import basic -from ansible_collections.community.general.tests.unit.compat import mock +from ansible_collections.community.internal_test_tools.tests.unit.compat import mock from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import ( AnsibleExitJson, AnsibleFailJson, diff --git a/tests/unit/plugins/modules/test_pagerduty.py b/tests/unit/plugins/modules/test_pagerduty.py index 75987d3df0..a65e53b3d0 100644 --- a/tests/unit/plugins/modules/test_pagerduty.py +++ b/tests/unit/plugins/modules/test_pagerduty.py @@ -5,7 +5,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible_collections.community.general.plugins.modules import pagerduty import json diff --git a/tests/unit/plugins/modules/test_pagerduty_alert.py b/tests/unit/plugins/modules/test_pagerduty_alert.py index 1010d23b64..e2872e4aaf 100644 --- a/tests/unit/plugins/modules/test_pagerduty_alert.py +++ b/tests/unit/plugins/modules/test_pagerduty_alert.py @@ -5,11 +5,11 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible_collections.community.general.plugins.modules import pagerduty_alert import json import pytest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/test_pagerduty_change.py b/tests/unit/plugins/modules/test_pagerduty_change.py index 81e7b90902..bbc54747a4 100644 --- a/tests/unit/plugins/modules/test_pagerduty_change.py +++ b/tests/unit/plugins/modules/test_pagerduty_change.py @@ -7,7 +7,7 @@ __metaclass__ = type import json import pytest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.general.plugins.modules import pagerduty_change from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/test_pamd.py b/tests/unit/plugins/modules/test_pamd.py index 4c49cebed7..274a50e553 100644 --- a/tests/unit/plugins/modules/test_pamd.py +++ b/tests/unit/plugins/modules/test_pamd.py @@ -5,7 +5,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible_collections.community.general.plugins.modules.pamd import PamdRule from ansible_collections.community.general.plugins.modules.pamd import PamdLine diff --git a/tests/unit/plugins/modules/test_parted.py b/tests/unit/plugins/modules/test_parted.py index b0285c7ccc..97c009d3e7 100644 --- a/tests/unit/plugins/modules/test_parted.py +++ b/tests/unit/plugins/modules/test_parted.py @@ -5,7 +5,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat.mock import patch, call +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch, call from ansible_collections.community.general.plugins.modules import parted as parted_module from ansible_collections.community.general.plugins.modules.parted import parse_parted_version from ansible_collections.community.general.plugins.modules.parted import parse_partition_info diff --git a/tests/unit/plugins/modules/test_pkgin.py b/tests/unit/plugins/modules/test_pkgin.py index dea5a05b5c..750c10da62 100644 --- a/tests/unit/plugins/modules/test_pkgin.py +++ b/tests/unit/plugins/modules/test_pkgin.py @@ -5,8 +5,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import mock -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import mock +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible_collections.community.general.plugins.modules import pkgin diff --git a/tests/unit/plugins/modules/test_pmem.py b/tests/unit/plugins/modules/test_pmem.py index c2f920c4c6..8f3788e407 100644 --- a/tests/unit/plugins/modules/test_pmem.py +++ b/tests/unit/plugins/modules/test_pmem.py @@ -12,7 +12,7 @@ import json pytest.importorskip('xmltodict') from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import ModuleTestCase, set_module_args, AnsibleFailJson, AnsibleExitJson -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.general.plugins.modules import pmem as pmem_module diff --git a/tests/unit/plugins/modules/test_pritunl_org.py b/tests/unit/plugins/modules/test_pritunl_org.py index 4ebb27e9fa..354c81eb8b 100644 --- a/tests/unit/plugins/modules/test_pritunl_org.py +++ b/tests/unit/plugins/modules/test_pritunl_org.py @@ -12,7 +12,7 @@ from ansible.module_utils.six import iteritems from ansible_collections.community.general.plugins.modules import ( pritunl_org, ) -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.general.tests.unit.plugins.module_utils.net_tools.pritunl.test_api import ( PritunlDeleteOrganizationMock, PritunlListOrganizationMock, diff --git a/tests/unit/plugins/modules/test_pritunl_org_info.py b/tests/unit/plugins/modules/test_pritunl_org_info.py index 92ffa8c0cf..c65ea2cfa6 100644 --- a/tests/unit/plugins/modules/test_pritunl_org_info.py +++ b/tests/unit/plugins/modules/test_pritunl_org_info.py @@ -10,7 +10,7 @@ import sys from ansible_collections.community.general.plugins.modules import ( pritunl_org_info, ) -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.general.tests.unit.plugins.module_utils.net_tools.pritunl.test_api import ( PritunlListOrganizationMock, PritunlEmptyOrganizationMock, diff --git a/tests/unit/plugins/modules/test_pritunl_user.py b/tests/unit/plugins/modules/test_pritunl_user.py index 74826553d0..ae66a4d90c 100644 --- a/tests/unit/plugins/modules/test_pritunl_user.py +++ b/tests/unit/plugins/modules/test_pritunl_user.py @@ -12,7 +12,7 @@ from ansible.module_utils.six import iteritems from ansible_collections.community.general.plugins.modules import ( pritunl_user, ) -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.general.tests.unit.plugins.module_utils.net_tools.pritunl.test_api import ( PritunlDeleteUserMock, PritunlListOrganizationMock, diff --git a/tests/unit/plugins/modules/test_pritunl_user_info.py b/tests/unit/plugins/modules/test_pritunl_user_info.py index 09bd22b535..ce3db8d87b 100644 --- a/tests/unit/plugins/modules/test_pritunl_user_info.py +++ b/tests/unit/plugins/modules/test_pritunl_user_info.py @@ -10,7 +10,7 @@ import sys from ansible_collections.community.general.plugins.modules import ( pritunl_user_info, ) -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.general.tests.unit.plugins.module_utils.net_tools.pritunl.test_api import ( PritunlListOrganizationMock, PritunlListUserMock, diff --git a/tests/unit/plugins/modules/test_proxmox_kvm.py b/tests/unit/plugins/modules/test_proxmox_kvm.py index 1134e1ff11..ffc806bdc8 100644 --- a/tests/unit/plugins/modules/test_proxmox_kvm.py +++ b/tests/unit/plugins/modules/test_proxmox_kvm.py @@ -19,7 +19,7 @@ mandatory_py_version = pytest.mark.skipif( ) from ansible_collections.community.general.plugins.modules import proxmox_kvm -from ansible_collections.community.general.tests.unit.compat.mock import ( +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import ( patch, DEFAULT, ) diff --git a/tests/unit/plugins/modules/test_proxmox_snap.py b/tests/unit/plugins/modules/test_proxmox_snap.py index 67c1b0e323..2aef4cb982 100644 --- a/tests/unit/plugins/modules/test_proxmox_snap.py +++ b/tests/unit/plugins/modules/test_proxmox_snap.py @@ -17,7 +17,7 @@ mandatory_py_version = pytest.mark.skipif( reason='The proxmoxer dependency requires python2.7 or higher' ) -from ansible_collections.community.general.tests.unit.compat.mock import MagicMock, patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import MagicMock, patch from ansible_collections.community.general.plugins.modules import proxmox_snap import ansible_collections.community.general.plugins.module_utils.proxmox as proxmox_utils from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import set_module_args diff --git a/tests/unit/plugins/modules/test_proxmox_storage_contents_info.py b/tests/unit/plugins/modules/test_proxmox_storage_contents_info.py index 917831792e..674dc45ac9 100644 --- a/tests/unit/plugins/modules/test_proxmox_storage_contents_info.py +++ b/tests/unit/plugins/modules/test_proxmox_storage_contents_info.py @@ -13,7 +13,7 @@ import pytest proxmoxer = pytest.importorskip("proxmoxer") from ansible_collections.community.general.plugins.modules import proxmox_storage_contents_info -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import ( AnsibleExitJson, AnsibleFailJson, diff --git a/tests/unit/plugins/modules/test_proxmox_tasks_info.py b/tests/unit/plugins/modules/test_proxmox_tasks_info.py index 46abde863a..08398d1504 100644 --- a/tests/unit/plugins/modules/test_proxmox_tasks_info.py +++ b/tests/unit/plugins/modules/test_proxmox_tasks_info.py @@ -23,7 +23,7 @@ mandatory_py_version = pytest.mark.skipif( from ansible_collections.community.general.plugins.modules import proxmox_tasks_info import ansible_collections.community.general.plugins.module_utils.proxmox as proxmox_utils -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import set_module_args NODE = 'node01' diff --git a/tests/unit/plugins/modules/test_proxmox_template.py b/tests/unit/plugins/modules/test_proxmox_template.py index 673a0a631e..3e20213e8b 100644 --- a/tests/unit/plugins/modules/test_proxmox_template.py +++ b/tests/unit/plugins/modules/test_proxmox_template.py @@ -20,7 +20,7 @@ mandatory_py_version = pytest.mark.skipif( ) from ansible_collections.community.general.plugins.modules import proxmox_template -from ansible_collections.community.general.tests.unit.compat.mock import patch, Mock +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch, Mock from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import ( AnsibleFailJson, ModuleTestCase, diff --git a/tests/unit/plugins/modules/test_proxmox_vm_info.py b/tests/unit/plugins/modules/test_proxmox_vm_info.py index 45006ff59a..8d2d0ab2ad 100644 --- a/tests/unit/plugins/modules/test_proxmox_vm_info.py +++ b/tests/unit/plugins/modules/test_proxmox_vm_info.py @@ -19,7 +19,7 @@ mandatory_py_version = pytest.mark.skipif( ) from ansible_collections.community.general.plugins.modules import proxmox_vm_info -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import ( AnsibleExitJson, AnsibleFailJson, diff --git a/tests/unit/plugins/modules/test_redis_info.py b/tests/unit/plugins/modules/test_redis_info.py index b0f2b7b07f..92ef1f4893 100644 --- a/tests/unit/plugins/modules/test_redis_info.py +++ b/tests/unit/plugins/modules/test_redis_info.py @@ -7,7 +7,7 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch, MagicMock from ansible_collections.community.general.plugins.modules import redis_info from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/test_rhn_register.py b/tests/unit/plugins/modules/test_rhn_register.py index 1394c07b65..5c67fdfda4 100644 --- a/tests/unit/plugins/modules/test_rhn_register.py +++ b/tests/unit/plugins/modules/test_rhn_register.py @@ -8,7 +8,7 @@ __metaclass__ = type import json import os -from ansible_collections.community.general.tests.unit.compat.mock import mock_open +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import mock_open from ansible.module_utils import basic from ansible.module_utils.common.text.converters import to_native import ansible.module_utils.six diff --git a/tests/unit/plugins/modules/test_rhsm_release.py b/tests/unit/plugins/modules/test_rhsm_release.py index db2ccc90fb..f07c91ee55 100644 --- a/tests/unit/plugins/modules/test_rhsm_release.py +++ b/tests/unit/plugins/modules/test_rhsm_release.py @@ -5,7 +5,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat.mock import call, patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import call, patch from ansible_collections.community.general.plugins.modules import rhsm_release from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import ( AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args) diff --git a/tests/unit/plugins/modules/test_rpm_ostree_pkg.py b/tests/unit/plugins/modules/test_rpm_ostree_pkg.py index 0490ff0194..dded3f1e1c 100644 --- a/tests/unit/plugins/modules/test_rpm_ostree_pkg.py +++ b/tests/unit/plugins/modules/test_rpm_ostree_pkg.py @@ -6,7 +6,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat.mock import call, patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import call, patch from ansible_collections.community.general.plugins.modules import rpm_ostree_pkg from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import ( AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args) diff --git a/tests/unit/plugins/modules/test_scaleway_compute_private_network.py b/tests/unit/plugins/modules/test_scaleway_compute_private_network.py index 3d51218781..1432d22df3 100644 --- a/tests/unit/plugins/modules/test_scaleway_compute_private_network.py +++ b/tests/unit/plugins/modules/test_scaleway_compute_private_network.py @@ -12,7 +12,7 @@ import pytest from ansible_collections.community.general.plugins.modules import scaleway_compute_private_network from ansible_collections.community.general.plugins.module_utils.scaleway import Scaleway, Response from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import set_module_args -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch def response_without_nics(): diff --git a/tests/unit/plugins/modules/test_scaleway_private_network.py b/tests/unit/plugins/modules/test_scaleway_private_network.py index 763ab31bcb..4d76380aa5 100644 --- a/tests/unit/plugins/modules/test_scaleway_private_network.py +++ b/tests/unit/plugins/modules/test_scaleway_private_network.py @@ -13,7 +13,7 @@ import pytest from ansible_collections.community.general.plugins.modules import scaleway_private_network from ansible_collections.community.general.plugins.module_utils.scaleway import Scaleway, Response from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import set_module_args -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch def response_with_zero_network(): diff --git a/tests/unit/plugins/modules/test_simpleinit_msb.py b/tests/unit/plugins/modules/test_simpleinit_msb.py index f6f5c17504..ab3e0a1409 100644 --- a/tests/unit/plugins/modules/test_simpleinit_msb.py +++ b/tests/unit/plugins/modules/test_simpleinit_msb.py @@ -6,7 +6,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleFailJson, ModuleTestCase, set_module_args from ansible_collections.community.general.plugins.modules.simpleinit_msb import SimpleinitMSB, build_module diff --git a/tests/unit/plugins/modules/test_slack.py b/tests/unit/plugins/modules/test_slack.py index a1f95fd037..e656ab902f 100644 --- a/tests/unit/plugins/modules/test_slack.py +++ b/tests/unit/plugins/modules/test_slack.py @@ -7,7 +7,7 @@ __metaclass__ = type import json import pytest -from ansible_collections.community.general.tests.unit.compat.mock import Mock, patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import Mock, patch from ansible_collections.community.general.plugins.modules import slack from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/test_statsd.py b/tests/unit/plugins/modules/test_statsd.py index bccae34f44..e3a152a940 100644 --- a/tests/unit/plugins/modules/test_statsd.py +++ b/tests/unit/plugins/modules/test_statsd.py @@ -6,7 +6,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.community.general.plugins.modules import statsd -from ansible_collections.community.general.tests.unit.compat.mock import patch, MagicMock +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch, MagicMock from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args diff --git a/tests/unit/plugins/modules/test_sysupgrade.py b/tests/unit/plugins/modules/test_sysupgrade.py index c21186d607..6e1d1f4549 100644 --- a/tests/unit/plugins/modules/test_sysupgrade.py +++ b/tests/unit/plugins/modules/test_sysupgrade.py @@ -6,7 +6,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.module_utils import basic -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import set_module_args, AnsibleExitJson, AnsibleFailJson, ModuleTestCase from ansible_collections.community.general.plugins.modules import sysupgrade diff --git a/tests/unit/plugins/modules/test_ufw.py b/tests/unit/plugins/modules/test_ufw.py index eadc548bbd..982cbb0612 100644 --- a/tests/unit/plugins/modules/test_ufw.py +++ b/tests/unit/plugins/modules/test_ufw.py @@ -4,8 +4,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible.module_utils import basic import ansible_collections.community.general.plugins.modules.ufw as module from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import ( diff --git a/tests/unit/plugins/modules/test_usb_facts.py b/tests/unit/plugins/modules/test_usb_facts.py index e794dea81d..9a5434b0a1 100644 --- a/tests/unit/plugins/modules/test_usb_facts.py +++ b/tests/unit/plugins/modules/test_usb_facts.py @@ -5,8 +5,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat import mock -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat import mock +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible.module_utils import basic from ansible_collections.community.general.plugins.modules import usb_facts from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, set_module_args, exit_json, fail_json diff --git a/tests/unit/plugins/modules/test_wdc_redfish_command.py b/tests/unit/plugins/modules/test_wdc_redfish_command.py index eeb65378e1..11ac1f63d5 100644 --- a/tests/unit/plugins/modules/test_wdc_redfish_command.py +++ b/tests/unit/plugins/modules/test_wdc_redfish_command.py @@ -12,8 +12,8 @@ import tarfile import tempfile import os -from ansible_collections.community.general.tests.unit.compat.mock import patch -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible.module_utils import basic import ansible_collections.community.general.plugins.modules.wdc_redfish_command as module from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson diff --git a/tests/unit/plugins/modules/test_wdc_redfish_info.py b/tests/unit/plugins/modules/test_wdc_redfish_info.py index d0b13953ca..8d16da50bc 100644 --- a/tests/unit/plugins/modules/test_wdc_redfish_info.py +++ b/tests/unit/plugins/modules/test_wdc_redfish_info.py @@ -6,8 +6,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat.mock import patch -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible.module_utils import basic import ansible_collections.community.general.plugins.modules.wdc_redfish_info as module from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson diff --git a/tests/unit/plugins/modules/test_xcc_redfish_command.py b/tests/unit/plugins/modules/test_xcc_redfish_command.py index 7f3dcf40f9..9c66661ac7 100644 --- a/tests/unit/plugins/modules/test_xcc_redfish_command.py +++ b/tests/unit/plugins/modules/test_xcc_redfish_command.py @@ -5,8 +5,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from ansible_collections.community.general.tests.unit.compat.mock import patch -from ansible_collections.community.general.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest from ansible.module_utils import basic import ansible_collections.community.general.plugins.modules.xcc_redfish_command as module from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import AnsibleExitJson, AnsibleFailJson diff --git a/tests/unit/plugins/modules/utils.py b/tests/unit/plugins/modules/utils.py index 406a2d14f1..e869bce957 100644 --- a/tests/unit/plugins/modules/utils.py +++ b/tests/unit/plugins/modules/utils.py @@ -8,8 +8,8 @@ __metaclass__ = type import contextlib as _contextlib import json -from ansible_collections.community.general.tests.unit.compat import unittest -from ansible_collections.community.general.tests.unit.compat.mock import patch +from ansible_collections.community.internal_test_tools.tests.unit.compat import unittest +from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import patch from ansible.module_utils import basic from ansible.module_utils.common.text.converters import to_bytes