mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Move unit test compat code out of lib/ansible/. (#46996)
* Move ansible.compat.tests to test/units/compat/. * Fix unit test references to ansible.compat.tests. * Move builtins compat to separate file. * Fix classification of test/units/compat/ dir.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
|
||||
from ansible.compat.tests.mock import patch, Mock
|
||||
from units.compat.mock import patch, Mock
|
||||
from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase
|
||||
|
||||
base_modules_mock = Mock()
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
from ansible.compat.tests.mock import patch, Mock, MagicMock, call
|
||||
from units.compat.mock import patch, Mock, MagicMock, call
|
||||
from units.modules.utils import set_module_args
|
||||
from .netscaler_module import TestModule, nitro_base_patcher
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
from ansible.compat.tests.mock import patch, Mock, MagicMock, call
|
||||
from units.compat.mock import patch, Mock, MagicMock, call
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
from ansible.compat.tests.mock import patch, Mock, MagicMock, call
|
||||
from units.compat.mock import patch, Mock, MagicMock, call
|
||||
from units.modules.utils import set_module_args
|
||||
from .netscaler_module import TestModule, nitro_base_patcher
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
from ansible.compat.tests.mock import patch, Mock, MagicMock, call
|
||||
from units.compat.mock import patch, Mock, MagicMock, call
|
||||
from units.modules.utils import set_module_args
|
||||
from .netscaler_module import TestModule, nitro_base_patcher
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
from ansible.compat.tests.mock import patch, Mock, MagicMock, call
|
||||
from units.compat.mock import patch, Mock, MagicMock, call
|
||||
from units.modules.utils import set_module_args
|
||||
from .netscaler_module import TestModule, nitro_base_patcher
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
from ansible.compat.tests.mock import patch, Mock, MagicMock, call
|
||||
from units.compat.mock import patch, Mock, MagicMock, call
|
||||
from units.modules.utils import set_module_args
|
||||
from .netscaler_module import TestModule, nitro_base_patcher
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
from ansible.compat.tests.mock import patch, Mock, MagicMock, call
|
||||
from units.compat.mock import patch, Mock, MagicMock, call
|
||||
from units.modules.utils import set_module_args
|
||||
from .netscaler_module import TestModule, nitro_base_patcher
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
from ansible.compat.tests.mock import patch, Mock, MagicMock, call
|
||||
from units.compat.mock import patch, Mock, MagicMock, call
|
||||
from units.modules.utils import set_module_args
|
||||
from .netscaler_module import TestModule, nitro_base_patcher
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
from ansible.compat.tests import unittest
|
||||
from ansible.compat.tests.mock import Mock
|
||||
from units.compat import unittest
|
||||
from units.compat.mock import Mock
|
||||
|
||||
|
||||
from ansible.module_utils.network.netscaler.netscaler import ConfigProxy, get_immutables_intersection, ensure_feature_is_enabled, log, loglines
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
from ansible.compat.tests.mock import patch, Mock, call
|
||||
from units.compat.mock import patch, Mock, call
|
||||
from .netscaler_module import TestModule
|
||||
import copy
|
||||
import tempfile
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
from ansible.compat.tests.mock import patch, Mock, MagicMock, call
|
||||
from units.compat.mock import patch, Mock, MagicMock, call
|
||||
from units.modules.utils import set_module_args
|
||||
from .netscaler_module import TestModule, nitro_base_patcher
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
from ansible.compat.tests.mock import patch, Mock, MagicMock, call
|
||||
from units.compat.mock import patch, Mock, MagicMock, call
|
||||
from units.modules.utils import set_module_args
|
||||
from .netscaler_module import TestModule, nitro_base_patcher
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
from ansible.compat.tests.mock import patch, Mock, MagicMock, call
|
||||
from units.compat.mock import patch, Mock, MagicMock, call
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
from ansible.compat.tests.mock import patch, Mock, MagicMock, call
|
||||
from units.compat.mock import patch, Mock, MagicMock, call
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
from ansible.compat.tests.mock import patch, Mock, MagicMock, call
|
||||
from units.compat.mock import patch, Mock, MagicMock, call
|
||||
from units.modules.utils import set_module_args
|
||||
from .netscaler_module import TestModule, nitro_base_patcher
|
||||
|
||||
|
||||
Reference in New Issue
Block a user