mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-06-29 23:49:09 +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:
parent
6e2897647c
commit
3033fd96b0
462 changed files with 773 additions and 776 deletions
|
|
@ -6,7 +6,7 @@ from ansible.modules.storage.netapp.netapp_e_alerts import Alerts
|
|||
from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args
|
||||
|
||||
__metaclass__ = type
|
||||
from ansible.compat.tests import mock
|
||||
from units.compat import mock
|
||||
|
||||
|
||||
class AlertsTest(ModuleTestCase):
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ from ansible.modules.storage.netapp.netapp_e_asup import Asup
|
|||
from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args
|
||||
|
||||
__metaclass__ = type
|
||||
from ansible.compat.tests import mock
|
||||
from units.compat import mock
|
||||
|
||||
|
||||
class AsupTest(ModuleTestCase):
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from ansible.modules.storage.netapp.netapp_e_auditlog import AuditLog
|
|||
from units.modules.utils import AnsibleFailJson, ModuleTestCase, set_module_args
|
||||
|
||||
__metaclass__ = type
|
||||
from ansible.compat.tests import mock
|
||||
from units.compat import mock
|
||||
|
||||
|
||||
class AuditLogTests(ModuleTestCase):
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ from ansible.modules.storage.netapp.netapp_e_global import GlobalSettings
|
|||
from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args
|
||||
|
||||
__metaclass__ = type
|
||||
from ansible.compat.tests import mock
|
||||
from units.compat import mock
|
||||
|
||||
|
||||
class GlobalSettingsTest(ModuleTestCase):
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import unittest
|
|||
import mock
|
||||
import pytest
|
||||
import json
|
||||
from ansible.compat.tests.mock import patch
|
||||
from units.compat.mock import patch
|
||||
from ansible.module_utils._text import to_bytes
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import unittest
|
|||
import mock
|
||||
import pytest
|
||||
import json
|
||||
from ansible.compat.tests.mock import patch
|
||||
from units.compat.mock import patch
|
||||
from ansible.module_utils._text import to_bytes
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ __metaclass__ = type
|
|||
|
||||
import mock
|
||||
|
||||
from ansible.compat.tests.mock import PropertyMock
|
||||
from units.compat.mock import PropertyMock
|
||||
|
||||
|
||||
class IscsiTargetTest(ModuleTestCase):
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ from ansible.modules.storage.netapp.netapp_e_ldap import Ldap
|
|||
from units.modules.utils import ModuleTestCase, set_module_args, AnsibleFailJson, AnsibleExitJson
|
||||
|
||||
__metaclass__ = type
|
||||
from ansible.compat.tests import mock
|
||||
from units.compat import mock
|
||||
|
||||
|
||||
class LdapTest(ModuleTestCase):
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase
|
|||
__metaclass__ = type
|
||||
|
||||
import mock
|
||||
from ansible.compat.tests.mock import PropertyMock
|
||||
from units.compat.mock import PropertyMock
|
||||
|
||||
|
||||
class MgmtInterfaceTest(ModuleTestCase):
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase
|
|||
import time
|
||||
|
||||
__metaclass__ = type
|
||||
from ansible.compat.tests import mock
|
||||
from units.compat import mock
|
||||
|
||||
|
||||
class AsupTest(ModuleTestCase):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue