Unit tests: remove unused imports (#59812)

* Unit tests: remove unused imports

* Unit tests: remove unused imports, fix
pull/59999/head
Andrey Klychkov 5 years ago committed by Felix Fontein
parent fc558fb85f
commit 64e3cb0fa8

@ -22,7 +22,7 @@ import sys
from units.compat import unittest
from ansible.module_utils.network.aci.aci import ACIModule
from ansible.module_utils.six import PY2, PY3
from ansible.module_utils.six import PY2
from ansible.module_utils._text import to_native
import pytest

@ -13,7 +13,7 @@ import os
import json
import pytest
from .FakeAnsibleModule import FakeAnsibleModule, ExitJsonException, FailJsonException
from .FakeAnsibleModule import FakeAnsibleModule
from ansible.module_utils import six
from mock import MagicMock

@ -9,7 +9,7 @@ __metaclass__ = type
import pytest
from .FakeAnsibleModule import FakeAnsibleModule, ExitJsonException, FailJsonException
from .FakeAnsibleModule import FailJsonException
from .common import testcase_bad_xenapi_refs

@ -9,7 +9,7 @@ __metaclass__ = type
import pytest
from .FakeAnsibleModule import FakeAnsibleModule, ExitJsonException, FailJsonException
from .FakeAnsibleModule import FailJsonException
from .common import fake_xenapi_ref

@ -7,7 +7,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
from .FakeAnsibleModule import FakeAnsibleModule, ExitJsonException, FailJsonException
from .FakeAnsibleModule import FailJsonException
def test_xapi_to_module_vm_power_state_bad_power_state(xenserver):

@ -9,7 +9,7 @@ __metaclass__ = type
import pytest
from .FakeAnsibleModule import FakeAnsibleModule, ExitJsonException, FailJsonException
from .FakeAnsibleModule import FailJsonException
from ansible.module_utils.common.network import is_mac
testcase_is_valid_mac_addr = [

@ -9,7 +9,7 @@ __metaclass__ = type
import pytest
from .FakeAnsibleModule import FakeAnsibleModule, ExitJsonException, FailJsonException
from .FakeAnsibleModule import FailJsonException
from .common import fake_xenapi_ref, testcase_bad_xenapi_refs

@ -9,7 +9,7 @@ __metaclass__ = type
import pytest
from .FakeAnsibleModule import FakeAnsibleModule, ExitJsonException, FailJsonException
from .FakeAnsibleModule import FailJsonException
from .common import fake_xenapi_ref, testcase_bad_xenapi_refs

@ -10,7 +10,7 @@ __metaclass__ = type
import pytest
import atexit
from .FakeAnsibleModule import FakeAnsibleModule, ExitJsonException, FailJsonException
from .FakeAnsibleModule import FailJsonException
from ansible.module_utils.ansible_release import __version__ as ANSIBLE_VERSION

@ -9,7 +9,7 @@ __metaclass__ = type
import pytest
from .FakeAnsibleModule import FakeAnsibleModule, ExitJsonException, FailJsonException
from .FakeAnsibleModule import FailJsonException
from .common import fake_xenapi_ref

@ -6,7 +6,7 @@ from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase
from ansible.modules.cloud.amazon.s3_bucket_notification import AmazonBucket, Config
from ansible.modules.cloud.amazon import s3_bucket_notification
try:
from botocore.exceptions import ClientError, ParamValidationError, BotoCoreError
from botocore.exceptions import ClientError
except ImportError:
pass

@ -1,7 +1,7 @@
from units.compat import unittest
from ansible.modules.monitoring import pagerduty_alert
from ansible.module_utils.six.moves.urllib.parse import urlparse, urlencode, urlunparse
from ansible.module_utils.six.moves.urllib.parse import urlunparse
class PagerDutyAlertsTest(unittest.TestCase):

@ -22,7 +22,7 @@ import pytest
from units.modules.utils import set_module_args, exit_json, fail_json, AnsibleFailJson, AnsibleExitJson
from ansible.module_utils import basic
from ansible.module_utils.network.checkpoint.checkpoint import checkpoint_argument_spec_for_objects, api_call
from ansible.module_utils.network.checkpoint.checkpoint import api_call
from ansible.modules.network.checkpoint import cp_network

@ -22,7 +22,7 @@ __metaclass__ = type
from units.compat.mock import patch, MagicMock
from ansible.modules.network.cli import cli_config
from units.modules.utils import set_module_args
from .cli_module import TestCliModule, load_fixture
from .cli_module import TestCliModule
class TestCliConfigModule(TestCliModule):

@ -20,9 +20,9 @@ from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
try:
from lxml.etree import tostring, fromstring
from lxml.etree import fromstring
except ImportError:
from xml.etree.ElementTree import tostring, fromstring
from xml.etree.ElementTree import fromstring
from units.compat.mock import patch
from ansible.modules.network.junos import junos_rpc

@ -33,7 +33,7 @@ from ansible.module_utils._text import to_bytes
from ansible.modules.network.netact import netact_cm_command
from units.compat.mock import patch
from units.modules.utils import set_module_args, AnsibleExitJson, AnsibleFailJson, ModuleTestCase
from units.modules.utils import set_module_args, AnsibleExitJson, AnsibleFailJson
class AnsibleExitJson(Exception):

@ -17,7 +17,7 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
from units.compat.mock import patch, Mock, MagicMock, call
from units.compat.mock import patch, Mock, call
from units.modules.utils import set_module_args
from .netscaler_module import TestModule, nitro_base_patcher

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_access_list_ip
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestAccessListIpModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_admin_service
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestAdminServiceModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_admin_session_timeout
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestAdminServiceModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_admin_syslog
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestAdminSyslogModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_connection_stats_settings
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestAdminServiceModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_cpu_class
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestCpuClassModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_cpu_mgmt_class
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestCpuMgmtClassModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_dhcp_filter
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestDhcpFilterModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_dscp_map
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestDscpMapModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_dscp_map_pri_map
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestCpuClassModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_fabric_local
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestFabricLocalModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_igmp_snooping
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestAdminServiceModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_ipv6security_raguard
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestIPV6SecurityRaguardModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_ipv6security_raguard_port
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestIPV6SecurityRaguardPortModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_ipv6security_raguard_vlan
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestIPV6SecurityReguardVlanModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_port_config
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestPortConfigModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_port_cos_bw
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestAdminServiceModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_port_cos_rate_setting
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestPortCosRateSettingModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_prefix_list
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestPrefixListModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_prefix_list_network
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestPrefixListNetworkModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_role
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestRoleModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_snmp_community
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestSnmpCommunityModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_snmp_trap_sink
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestSnmpTrapSinkModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_snmp_vacm
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestSnmpVacmModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_stp
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestStpModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_stp_port
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestStpPortModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_switch_setup
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestSwitchSetupModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_user
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestUserModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_vflow_table_profile
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestVflowTableProfileModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_vrouter_bgp
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestVrouterBGPModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_vrouter_bgp_network
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestVrouterBGPNetworkModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_vrouter_interface_ip
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestVrouterInterfaceIpModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_vrouter_loopback_interface
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestVrouterLoopbackInterfaceModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_vrouter_ospf
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestVrouterOSPFModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_vrouter_ospf6
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestVrouterOSPF6Module(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_vrouter_packet_relay
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestVrouterPacketRelayModule(TestNvosModule):

@ -7,7 +7,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_vrouter_pim_config
from units.modules.utils import set_module_args
from .nvos_module import TestNvosModule, load_fixture
from .nvos_module import TestNvosModule
class TestVrouterPimConfigModule(TestNvosModule):

@ -22,7 +22,7 @@ import json
from units.compat.mock import patch
from ansible.modules.network.nso import nso_config
from units.modules.utils import set_module_args, AnsibleFailJson
from units.modules.utils import set_module_args
from . import nso_module
from .nso_module import MockResponse

@ -17,7 +17,7 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
from units.compat.mock import patch
from units.modules.utils import set_module_args as _set_module_args, AnsibleExitJson, AnsibleFailJson, ModuleTestCase
from units.modules.utils import set_module_args as _set_module_args, ModuleTestCase
import pytest

@ -21,7 +21,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.nxos import nxos_ospf
from .nxos_module import TestNxosModule, load_fixture, set_module_args
from .nxos_module import TestNxosModule, set_module_args
class TestNxosOspfModule(TestNxosModule):

@ -21,7 +21,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.nxos import nxos_pim_interface
from .nxos_module import TestNxosModule, load_fixture, set_module_args
from .nxos_module import TestNxosModule, set_module_args
class TestNxosPimInterfaceBfdModule(TestNxosModule):

@ -22,7 +22,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from units.compat.mock import patch, Mock, MagicMock
from units.compat.mock import patch, Mock
import sys
sys.modules['cps'] = Mock(QUALIFIERS=[
"target",

@ -20,7 +20,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.vyos import vyos_banner
from units.modules.utils import set_module_args
from .vyos_module import TestVyosModule, load_fixture
from .vyos_module import TestVyosModule
class TestVyosBannerModule(TestVyosModule):

@ -22,7 +22,7 @@ __metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.vyos import vyos_static_route
from units.modules.utils import set_module_args
from .vyos_module import TestVyosModule, load_fixture
from .vyos_module import TestVyosModule
class TestVyosStaticRouteModule(TestVyosModule):

@ -2,7 +2,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
import sys
from units.compat.mock import patch, Mock
from units.compat.mock import Mock
# FIXME: These should be done inside of a fixture so that they're only mocked during
# these unittests

@ -18,7 +18,7 @@
import yaml
from units.compat import unittest, mock
from oneview_module_loader import EthernetNetworkModule, OneViewModuleResourceNotFound
from oneview_module_loader import EthernetNetworkModule
from hpe_test_utils import OneViewBaseTestCase
FAKE_MSG_ERROR = 'Fake message error'

@ -1,7 +1,7 @@
# Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from units.compat import unittest, mock
from units.compat import unittest
from oneview_module_loader import EthernetNetworkFactsModule
from hpe_test_utils import FactsParamsTestCase

@ -9,7 +9,7 @@ import pytest
import sys
from units.compat import unittest
from units.compat.mock import patch, Mock
from units.compat.mock import patch
from ansible.module_utils import basic
from ansible.module_utils._text import to_bytes
import ansible.module_utils.netapp as netapp_utils

@ -8,7 +8,7 @@ import json
import pytest
from units.compat import unittest
from units.compat.mock import patch, Mock
from units.compat.mock import patch
from ansible.module_utils import basic
from ansible.module_utils._text import to_bytes
import ansible.module_utils.netapp as netapp_utils

@ -8,7 +8,7 @@ import json
import pytest
from units.compat import unittest
from units.compat.mock import patch, Mock
from units.compat.mock import patch
from ansible.module_utils import basic
from ansible.module_utils._text import to_bytes
import ansible.module_utils.netapp as netapp_utils

@ -8,7 +8,7 @@ import json
import pytest
from units.compat import unittest
from units.compat.mock import patch, Mock
from units.compat.mock import patch
from ansible.module_utils import basic
from ansible.module_utils._text import to_bytes
import ansible.module_utils.netapp as netapp_utils

@ -3,7 +3,7 @@
from ansible.modules.storage.netapp.netapp_e_global import GlobalSettings
from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args
from units.modules.utils import AnsibleFailJson, ModuleTestCase, set_module_args
__metaclass__ = type
from units.compat import mock

@ -3,7 +3,7 @@
from mock import MagicMock
from ansible.module_utils import basic, netapp
from ansible.module_utils import netapp
from ansible.modules.storage.netapp import netapp_e_host
from ansible.modules.storage.netapp.netapp_e_host import Host
from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args

@ -3,7 +3,7 @@
from mock import MagicMock
from ansible.module_utils import basic, netapp
from ansible.module_utils import netapp
from ansible.modules.storage.netapp import netapp_e_host
from ansible.modules.storage.netapp.netapp_e_host import Host
from ansible.modules.storage.netapp.netapp_e_iscsi_interface import IscsiInterface

@ -5,7 +5,7 @@
from mock import MagicMock
from ansible.modules.storage.netapp.netapp_e_iscsi_target import IscsiTarget
from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args
from units.modules.utils import AnsibleFailJson, ModuleTestCase, set_module_args
__metaclass__ = type

@ -3,7 +3,7 @@
from ansible.modules.storage.netapp.netapp_e_syslog import Syslog
from ansible.module_utils.six.moves.urllib.error import HTTPError
from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args
from units.modules.utils import AnsibleFailJson, ModuleTestCase, set_module_args
__metaclass__ = type
from units.compat import mock

@ -9,7 +9,7 @@ except ImportError:
from ansible.module_utils.netapp import NetAppESeriesModule
from ansible.modules.storage.netapp.netapp_e_volume import NetAppESeriesVolume
from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args
from units.modules.utils import AnsibleFailJson, ModuleTestCase, set_module_args
__metaclass__ = type

@ -22,7 +22,7 @@ __metaclass__ = type
from units.compat import unittest
from units.compat.mock import patch, MagicMock
from ansible.errors import AnsibleError, AnsibleParserError
from ansible.errors import AnsibleParserError
from ansible.playbook.block import Block
from ansible.playbook.play import Play
from ansible.playbook.role import Role

@ -20,8 +20,8 @@ from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from units.compat import unittest
from units.compat.mock import patch, MagicMock
from ansible.errors import AnsibleError, AnsibleParserError
from units.compat.mock import MagicMock
from ansible.errors import AnsibleParserError
from ansible.playbook import Playbook
from ansible.vars.manager import VariableManager

@ -22,7 +22,7 @@ import os
from ansible.errors import AnsibleActionFail
from units.compat import unittest
from units.compat.mock import patch, MagicMock, Mock
from units.compat.mock import MagicMock, Mock
from ansible.plugins.action.raw import ActionModule
from ansible.playbook.task import Task
from ansible.plugins.loader import connection_loader

@ -8,7 +8,7 @@ __metaclass__ = type
import pytest
from units.compat.mock import patch, MagicMock, mock_open
from units.compat.mock import patch, MagicMock
from ansible.plugins.action.win_updates import ActionModule
from ansible.playbook.task import Task

@ -25,7 +25,7 @@ import textwrap
import types
from units.compat import unittest
from units.compat.mock import patch, mock_open, MagicMock
from units.compat.mock import MagicMock
from ansible.plugins.callback import CallbackBase

@ -22,7 +22,7 @@ __metaclass__ = type
from os import path
import json
from mock import MagicMock, call
from mock import MagicMock
from units.compat import unittest
from ansible.plugins.cliconf import ios

@ -7,7 +7,7 @@ from ansible.module_utils.six.moves.urllib.error import HTTPError
from units.compat import mock
from units.compat import unittest
from units.compat.builtins import BUILTINS
from units.compat.mock import mock_open, patch
from units.compat.mock import patch
from ansible.errors import AnsibleConnectionFailure
from ansible.module_utils.connection import ConnectionError

@ -25,7 +25,7 @@ import uuid
from units.compat import unittest
from units.compat.mock import patch, MagicMock
from ansible.errors import AnsibleError, AnsibleParserError
from ansible.errors import AnsibleParserError
from ansible.executor.process.worker import WorkerProcess
from ansible.executor.task_queue_manager import TaskQueueManager
from ansible.executor.task_result import TaskResult

@ -24,8 +24,8 @@ import os
from units.compat import unittest
from units.compat.builtins import BUILTINS
from units.compat.mock import mock_open, patch, MagicMock
from ansible.plugins.loader import MODULE_CACHE, PATH_CACHE, PLUGIN_PATH_CACHE, PluginLoader
from units.compat.mock import patch, MagicMock
from ansible.plugins.loader import PluginLoader
class TestErrors(unittest.TestCase):

@ -23,7 +23,7 @@ import sys
from collections import defaultdict
from units.compat import unittest
from units.compat.mock import patch, MagicMock
from units.compat.mock import MagicMock
from ansible.template.safe_eval import safe_eval

Loading…
Cancel
Save