mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-07-01 16:18:55 +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
|
|
@ -24,7 +24,7 @@ try:
|
|||
except ImportError:
|
||||
from xml.etree.ElementTree import fromstring
|
||||
|
||||
from ansible.compat.tests.mock import patch
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.junos import junos_command
|
||||
from units.modules.utils import set_module_args
|
||||
from .junos_module import TestJunosModule, load_fixture
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible.compat.tests.mock import patch
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.junos import junos_config
|
||||
from units.modules.utils import set_module_args
|
||||
from ansible.module_utils._text import to_text
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ try:
|
|||
except ImportError:
|
||||
from xml.etree.ElementTree import fromstring
|
||||
|
||||
from ansible.compat.tests.mock import patch
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.junos import junos_facts
|
||||
from units.modules.utils import set_module_args
|
||||
from .junos_module import TestJunosModule, load_fixture
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible.compat.tests.mock import patch
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.junos import junos_netconf
|
||||
from units.modules.utils import set_module_args
|
||||
from .junos_module import TestJunosModule
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible.compat.tests.mock import patch, MagicMock
|
||||
from units.compat.mock import patch, MagicMock
|
||||
from units.modules.utils import set_module_args
|
||||
from .junos_module import TestJunosModule
|
||||
jnpr_mock = MagicMock()
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ try:
|
|||
except ImportError:
|
||||
from xml.etree.ElementTree import tostring, fromstring
|
||||
|
||||
from ansible.compat.tests.mock import patch
|
||||
from units.compat.mock import patch
|
||||
from ansible.modules.network.junos import junos_rpc
|
||||
from units.modules.utils import set_module_args
|
||||
from .junos_module import TestJunosModule, load_fixture
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible.compat.tests.mock import patch, MagicMock
|
||||
from units.compat.mock import patch, MagicMock
|
||||
from units.modules.utils import set_module_args
|
||||
from .junos_module import TestJunosModule
|
||||
jnpr_mock = MagicMock()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue