mirror of
https://github.com/ansible-collections/community.routeros.git
synced 2025-06-21 17:39:04 +02:00
Remove unnecessary test imports. (#150)
This commit is contained in:
parent
622680fe3f
commit
1dfa79c5ef
10 changed files with 5 additions and 25 deletions
|
@ -6,7 +6,6 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ __metaclass__ = type
|
|||
# One unittest needs to import builtins via __import__() so we need to have
|
||||
# the string that represents it
|
||||
try:
|
||||
import __builtin__
|
||||
import __builtin__ # noqa: F401, pylint: disable=unused-import
|
||||
except ImportError:
|
||||
BUILTINS = 'builtins'
|
||||
else:
|
||||
|
|
|
@ -20,12 +20,12 @@ 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 *
|
||||
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 *
|
||||
from mock import * # noqa: F401, pylint: disable=unused-import
|
||||
except ImportError:
|
||||
print('You need the mock library installed on python2.x to run tests')
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@ import sys
|
|||
if sys.version_info < (2, 7):
|
||||
try:
|
||||
# Need unittest2 on python2.6
|
||||
from unittest2 import *
|
||||
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 *
|
||||
from unittest import * # noqa: F401, pylint: disable=unused-import
|
||||
|
|
|
@ -9,8 +9,6 @@ __metaclass__ = type
|
|||
|
||||
import pytest
|
||||
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
from ansible_collections.community.routeros.plugins.module_utils._api_data import (
|
||||
APIData,
|
||||
KeyInfo,
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import json
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.routeros.tests.unit.compat.mock import patch, MagicMock
|
||||
from ansible_collections.community.routeros.tests.unit.plugins.modules.fake_api import FakeLibRouterosError, Key, Or, fake_ros_api
|
||||
from ansible_collections.community.routeros.tests.unit.plugins.modules.utils import set_module_args, AnsibleExitJson, AnsibleFailJson, ModuleTestCase
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import json
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.routeros.tests.unit.compat.mock import patch, MagicMock
|
||||
from ansible_collections.community.routeros.tests.unit.plugins.modules.fake_api import FakeLibRouterosError, Key, fake_ros_api
|
||||
from ansible_collections.community.routeros.tests.unit.plugins.modules.utils import set_module_args, AnsibleExitJson, AnsibleFailJson, ModuleTestCase
|
||||
|
|
|
@ -6,15 +6,11 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import json
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.routeros.tests.unit.compat.mock import patch, MagicMock
|
||||
from ansible_collections.community.routeros.tests.unit.plugins.modules.fake_api import (
|
||||
FakeLibRouterosError, fake_ros_api, massage_expected_result_data, create_fake_path,
|
||||
)
|
||||
from ansible_collections.community.routeros.tests.unit.plugins.modules.utils import set_module_args, AnsibleExitJson, AnsibleFailJson, ModuleTestCase
|
||||
from ansible_collections.community.routeros.plugins.module_utils._api_data import PATHS
|
||||
from ansible_collections.community.routeros.plugins.modules import api_find_and_modify
|
||||
|
||||
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import json
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.routeros.tests.unit.compat.mock import patch, MagicMock
|
||||
from ansible_collections.community.routeros.tests.unit.plugins.modules.fake_api import FakeLibRouterosError, Key, fake_ros_api
|
||||
from ansible_collections.community.routeros.tests.unit.plugins.modules.utils import set_module_args, AnsibleExitJson, AnsibleFailJson, ModuleTestCase
|
||||
|
|
|
@ -6,15 +6,11 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import json
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.routeros.tests.unit.compat.mock import patch, MagicMock
|
||||
from ansible_collections.community.routeros.tests.unit.plugins.modules.fake_api import (
|
||||
FakeLibRouterosError, fake_ros_api, massage_expected_result_data, create_fake_path,
|
||||
)
|
||||
from ansible_collections.community.routeros.tests.unit.plugins.modules.utils import set_module_args, AnsibleExitJson, AnsibleFailJson, ModuleTestCase
|
||||
from ansible_collections.community.routeros.plugins.module_utils._api_data import PATHS
|
||||
from ansible_collections.community.routeros.plugins.modules import api_modify
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue