Switch to unittest mock
Python3 have a standard library for mock in the unittest module, let's drop the mock requirement and switch tests to unittest mock. Change-Id: I4f1b3e25c8adbc24cdda51c73da3b66967f7ef23
This commit is contained in:
parent
2ffbfb4b46
commit
d6e7552457
@ -20,9 +20,9 @@
|
||||
# ceilometer/tests/api/__init__.py). This should be oslo'ified:
|
||||
# https://bugs.launchpad.net/ironic/+bug/1255115.
|
||||
|
||||
from unittest import mock
|
||||
from urllib import parse as urlparse
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
import pecan
|
||||
import pecan.testing
|
||||
|
@ -17,8 +17,8 @@ are blocked or allowed to be processed.
|
||||
"""
|
||||
|
||||
from http import client as http_client
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
|
||||
from ironic.tests.unit.api import base
|
||||
|
@ -13,8 +13,9 @@
|
||||
Tests to assert that audit middleware works as expected.
|
||||
"""
|
||||
|
||||
from unittest import mock
|
||||
|
||||
from keystonemiddleware import audit
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
|
||||
from ironic.common import exception
|
||||
|
@ -13,7 +13,8 @@
|
||||
Tests to assert that audit middleware works as expected.
|
||||
"""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_middleware import healthcheck
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
from http import client as http_client
|
||||
import json
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
import oslo_messaging as messaging
|
||||
|
||||
|
@ -10,7 +10,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from osprofiler import web
|
||||
|
||||
|
@ -11,7 +11,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from ironic.cmd import conductor
|
||||
|
@ -13,7 +13,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from ironic.cmd import dbsync
|
||||
from ironic.common import context
|
||||
|
@ -12,7 +12,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_upgradecheck.upgradecheck import Code
|
||||
|
||||
from ironic.cmd import dbsync
|
||||
|
@ -14,10 +14,10 @@
|
||||
import datetime
|
||||
from http import client as http_client
|
||||
import json
|
||||
from unittest import mock
|
||||
|
||||
from cinderclient import exceptions as cinder_exceptions
|
||||
import cinderclient.v3 as cinderclient
|
||||
import mock
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
from ironic.common import cinder
|
||||
|
@ -10,7 +10,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_context import context as oslo_context
|
||||
|
||||
from ironic.common import context
|
||||
@ -49,7 +50,7 @@ class RequestContextTestCase(tests_base.TestCase):
|
||||
{'project_name': 'demo', 'is_public_api': True,
|
||||
'domain_id': 'meow'})
|
||||
self.assertEqual('demo', test_context.project_name)
|
||||
self.assertEqual('meow', test_context.user_domain)
|
||||
self.assertEqual('meow', test_context.user_domain_id)
|
||||
self.assertTrue(test_context.is_public_api)
|
||||
|
||||
def test_to_policy_values(self):
|
||||
|
@ -12,7 +12,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import uuidutils
|
||||
from stevedore import named
|
||||
|
||||
|
@ -17,11 +17,11 @@
|
||||
import datetime
|
||||
import importlib
|
||||
import time
|
||||
from unittest import mock
|
||||
|
||||
from glanceclient import client as glance_client
|
||||
from glanceclient import exc as glance_exc
|
||||
from keystoneauth1 import loading as kaloading
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import uuidutils
|
||||
import retrying
|
||||
|
@ -16,8 +16,8 @@ from http import client as http_client
|
||||
import io
|
||||
import os
|
||||
import shutil
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_utils import uuidutils
|
||||
import requests
|
||||
import sendfile
|
||||
|
@ -19,10 +19,10 @@ import builtins
|
||||
import io
|
||||
import os
|
||||
import shutil
|
||||
from unittest import mock
|
||||
|
||||
from ironic_lib import disk_utils
|
||||
from ironic_lib import utils as ironic_utils
|
||||
import mock
|
||||
from oslo_concurrency import processutils
|
||||
from oslo_config import cfg
|
||||
|
||||
|
@ -10,8 +10,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from unittest import mock
|
||||
|
||||
import fixtures
|
||||
import mock
|
||||
import oslo_messaging
|
||||
import webob
|
||||
|
||||
|
@ -12,8 +12,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from unittest import mock
|
||||
|
||||
from keystoneauth1 import loading as kaloading
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_config import fixture
|
||||
|
||||
|
@ -13,7 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
from ironic.common import exception
|
||||
|
@ -12,9 +12,9 @@
|
||||
|
||||
import copy
|
||||
import time
|
||||
from unittest import mock
|
||||
|
||||
from keystoneauth1 import loading as kaloading
|
||||
import mock
|
||||
from neutronclient.common import exceptions as neutron_client_exc
|
||||
from neutronclient.v2_0 import client
|
||||
from oslo_utils import uuidutils
|
||||
|
@ -10,13 +10,12 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from unittest import mock
|
||||
|
||||
import ddt
|
||||
from keystoneauth1 import exceptions as kaexception
|
||||
import mock
|
||||
import requests
|
||||
|
||||
|
||||
from ironic.common import context
|
||||
from ironic.common import keystone
|
||||
from ironic.common import nova
|
||||
|
@ -16,8 +16,8 @@
|
||||
# under the License.
|
||||
|
||||
import sys
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_policy import policy as oslo_policy
|
||||
|
||||
|
@ -16,9 +16,9 @@
|
||||
|
||||
import os
|
||||
import tempfile
|
||||
from unittest import mock
|
||||
|
||||
from ironic_lib import utils as ironic_utils
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import fileutils
|
||||
from oslo_utils import uuidutils
|
||||
|
@ -12,7 +12,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import versionutils
|
||||
|
||||
from ironic.api.controllers.v1 import versions as api_versions
|
||||
|
@ -10,7 +10,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
import oslo_messaging as messaging
|
||||
|
||||
|
@ -10,7 +10,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
import oslo_messaging
|
||||
from oslo_service import service as base_service
|
||||
|
@ -15,8 +15,8 @@
|
||||
import builtins
|
||||
from http import client as http_client
|
||||
import io
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from swiftclient import client as swift_client
|
||||
from swiftclient import exceptions as swift_exception
|
||||
|
@ -19,9 +19,9 @@ import os
|
||||
import os.path
|
||||
import shutil
|
||||
import tempfile
|
||||
from unittest import mock
|
||||
|
||||
import jinja2
|
||||
import mock
|
||||
from oslo_concurrency import processutils
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import netutils
|
||||
|
@ -10,7 +10,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_concurrency import processutils
|
||||
from oslo_config import cfg
|
||||
|
||||
|
@ -17,8 +17,9 @@
|
||||
|
||||
"""Test utils for Ironic Managers."""
|
||||
|
||||
from unittest import mock
|
||||
|
||||
from futurist import periodics
|
||||
import mock
|
||||
from oslo_utils import strutils
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
|
@ -12,7 +12,8 @@
|
||||
|
||||
"""Unit tests for functionality related to allocations."""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
import oslo_messaging as messaging
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
|
@ -13,13 +13,13 @@
|
||||
"""Test class for Ironic BaseConductorManager."""
|
||||
|
||||
import collections
|
||||
from unittest import mock
|
||||
import uuid
|
||||
|
||||
import eventlet
|
||||
import futurist
|
||||
from futurist import periodics
|
||||
from ironic_lib import mdns
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_db import exception as db_exception
|
||||
from oslo_utils import uuidutils
|
||||
|
@ -12,7 +12,8 @@
|
||||
|
||||
"""Tests for cleaning bits."""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
|
@ -13,7 +13,8 @@
|
||||
|
||||
"""Tests for deployment aspects of the conductor."""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_db import exception as db_exception
|
||||
from oslo_utils import uuidutils
|
||||
|
@ -22,10 +22,10 @@ from collections import namedtuple
|
||||
import datetime
|
||||
import queue
|
||||
import re
|
||||
from unittest import mock
|
||||
|
||||
import eventlet
|
||||
from futurist import waiters
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
import oslo_messaging as messaging
|
||||
from oslo_utils import uuidutils
|
||||
|
@ -15,7 +15,8 @@
|
||||
|
||||
"""Test class for ironic-conductor notification utilities."""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_versionedobjects.exception import VersionedObjectsException
|
||||
|
||||
from ironic.common import exception
|
||||
|
@ -19,8 +19,8 @@ Unit Tests for :py:class:`ironic.conductor.rpcapi.ConductorAPI`.
|
||||
"""
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
import oslo_messaging as messaging
|
||||
from oslo_messaging import _utils as messaging_utils
|
||||
|
@ -10,7 +10,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
|
@ -17,8 +17,9 @@
|
||||
|
||||
"""Tests for :class:`ironic.conductor.task_manager`."""
|
||||
|
||||
from unittest import mock
|
||||
|
||||
import futurist
|
||||
import mock
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
from ironic.common import driver_factory
|
||||
|
@ -10,8 +10,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import time
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import timeutils
|
||||
from oslo_utils import uuidutils
|
||||
|
@ -36,10 +36,10 @@ For postgres on Ubuntu this can be done with the following commands:
|
||||
|
||||
import collections
|
||||
import contextlib
|
||||
from unittest import mock
|
||||
|
||||
from alembic import script
|
||||
import fixtures
|
||||
import mock
|
||||
from oslo_db import exception as db_exc
|
||||
from oslo_db.sqlalchemy import enginefacade
|
||||
from oslo_db.sqlalchemy import test_fixtures
|
||||
|
@ -11,8 +11,8 @@
|
||||
# under the License.
|
||||
|
||||
import random
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_db.sqlalchemy import utils as db_utils
|
||||
from oslo_utils import uuidutils
|
||||
from testtools import matchers
|
||||
|
@ -16,8 +16,8 @@
|
||||
"""Tests for manipulating Conductors via the DB API"""
|
||||
|
||||
import datetime
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import oslo_db
|
||||
from oslo_db import exception as db_exc
|
||||
from oslo_db import sqlalchemy
|
||||
|
@ -16,8 +16,8 @@
|
||||
"""Tests for manipulating Nodes via the DB API"""
|
||||
|
||||
import datetime
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_utils import timeutils
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
|
@ -14,8 +14,8 @@
|
||||
# under the License.
|
||||
|
||||
import inspect
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import stevedore
|
||||
|
||||
from ironic.common import dhcp_factory
|
||||
|
@ -14,7 +14,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutronclient.common import exceptions as neutron_client_exc
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
|
@ -11,9 +11,9 @@
|
||||
# limitations under the License.
|
||||
|
||||
import json
|
||||
from unittest import mock
|
||||
|
||||
from ironic_lib import utils as irlib_utils
|
||||
import mock
|
||||
from oslo_concurrency import processutils
|
||||
|
||||
from ironic.common import exception
|
||||
|
@ -19,8 +19,9 @@
|
||||
Test class for DRAC BIOS configuration specific methods
|
||||
"""
|
||||
|
||||
from unittest import mock
|
||||
|
||||
from dracclient import exceptions as drac_exceptions
|
||||
import mock
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.common import states
|
||||
|
@ -18,7 +18,8 @@
|
||||
Test class for DRAC boot interface
|
||||
"""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import importutils
|
||||
|
||||
from ironic.common import boot_devices
|
||||
|
@ -15,8 +15,9 @@
|
||||
Test class for common methods used by DRAC modules.
|
||||
"""
|
||||
|
||||
from unittest import mock
|
||||
|
||||
import dracclient.client
|
||||
import mock
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.drivers.modules.drac import common as drac_common
|
||||
|
@ -15,8 +15,9 @@
|
||||
Test class for DRAC inspection interface
|
||||
"""
|
||||
|
||||
from unittest import mock
|
||||
|
||||
from dracclient import exceptions as drac_exceptions
|
||||
import mock
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.common import states
|
||||
|
@ -15,8 +15,9 @@
|
||||
Test class for DRAC job specific methods
|
||||
"""
|
||||
|
||||
from unittest import mock
|
||||
|
||||
from dracclient import exceptions as drac_exceptions
|
||||
import mock
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.conductor import task_manager
|
||||
|
@ -20,7 +20,8 @@
|
||||
Test class for DRAC management interface
|
||||
"""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import importutils
|
||||
|
||||
import ironic.common.boot_devices
|
||||
|
@ -15,7 +15,7 @@
|
||||
Test class for DRAC periodic tasks
|
||||
"""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from ironic.conductor import task_manager
|
||||
from ironic.conductor import utils as manager_utils
|
||||
|
@ -15,9 +15,10 @@
|
||||
Test class for DRAC power interface
|
||||
"""
|
||||
|
||||
from unittest import mock
|
||||
|
||||
from dracclient import constants as drac_constants
|
||||
from dracclient import exceptions as drac_exceptions
|
||||
import mock
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.common import states
|
||||
|
@ -15,9 +15,10 @@
|
||||
Test class for DRAC RAID interface
|
||||
"""
|
||||
|
||||
from unittest import mock
|
||||
|
||||
from dracclient import constants
|
||||
from dracclient import exceptions as drac_exceptions
|
||||
import mock
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.common import states
|
||||
|
@ -12,7 +12,7 @@
|
||||
# under the License.
|
||||
"""Test base class for iBMC Driver."""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from ironic.drivers.modules.ibmc import utils
|
||||
from ironic.tests.unit.db import base as db_base
|
||||
|
@ -13,8 +13,8 @@
|
||||
"""Test class for iBMC Management interface."""
|
||||
|
||||
import itertools
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_utils import importutils
|
||||
|
||||
from ironic.common import boot_devices
|
||||
|
@ -12,7 +12,8 @@
|
||||
# under the License.
|
||||
"""Test class for iBMC Power interface."""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import importutils
|
||||
|
||||
from ironic.common import exception
|
||||
|
@ -14,8 +14,8 @@
|
||||
|
||||
import copy
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_utils import importutils
|
||||
|
||||
from ironic.common import exception
|
||||
|
@ -12,7 +12,8 @@
|
||||
# under the License.
|
||||
"""Test class for iBMC vendor interface."""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import importutils
|
||||
|
||||
from ironic.conductor import task_manager
|
||||
|
@ -15,7 +15,8 @@
|
||||
|
||||
"""Test class for IloPower module."""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import importutils
|
||||
|
||||
|
@ -17,9 +17,9 @@
|
||||
|
||||
import io
|
||||
import tempfile
|
||||
from unittest import mock
|
||||
|
||||
from ironic_lib import utils as ironic_utils
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
|
||||
from ironic.common import boot_devices
|
||||
|
@ -21,9 +21,9 @@ import io
|
||||
import os
|
||||
import shutil
|
||||
import tempfile
|
||||
from unittest import mock
|
||||
|
||||
from ironic_lib import utils as ironic_utils
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import importutils
|
||||
from oslo_utils import uuidutils
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
"""Test class for common methods used by iLO modules."""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.conductor import task_manager
|
||||
|
@ -16,9 +16,10 @@
|
||||
|
||||
import builtins
|
||||
import io
|
||||
from unittest import mock
|
||||
from urllib import parse as urlparse
|
||||
|
||||
import mock
|
||||
|
||||
from oslo_utils import importutils
|
||||
|
||||
from ironic.common import exception
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
"""Test class for Management Interface used by iLO modules."""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.common import states
|
||||
|
@ -14,7 +14,8 @@
|
||||
|
||||
"""Test class for Management Interface used by iLO modules."""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import importutils
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
|
@ -15,7 +15,8 @@
|
||||
|
||||
"""Test class for IloPower module."""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import importutils
|
||||
from oslo_utils import uuidutils
|
||||
|
@ -14,7 +14,8 @@
|
||||
|
||||
"""Test class for Raid Interface used by iLO5."""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import importutils
|
||||
|
||||
from ironic.common import exception
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
"""Test class for vendor methods used by iLO modules."""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.common import states
|
||||
|
@ -12,7 +12,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.conductor import task_manager
|
||||
|
@ -16,7 +16,7 @@
|
||||
Test class for IRMC BIOS configuration
|
||||
"""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.conductor import task_manager
|
||||
|
@ -20,9 +20,9 @@ import io
|
||||
import os
|
||||
import shutil
|
||||
import tempfile
|
||||
from unittest import mock
|
||||
|
||||
from ironic_lib import utils as ironic_utils
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
|
@ -16,7 +16,8 @@
|
||||
Test class for common methods used by iRMC modules.
|
||||
"""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
Test class for iRMC Inspection Driver
|
||||
"""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.common import states
|
||||
|
@ -17,10 +17,9 @@ Test class for iRMC Management Driver
|
||||
"""
|
||||
|
||||
import os
|
||||
from unittest import mock
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
import mock
|
||||
|
||||
from ironic.common import boot_devices
|
||||
from ironic.common import exception
|
||||
from ironic.common import states
|
||||
|
@ -16,7 +16,8 @@
|
||||
Test class for iRMC periodic tasks
|
||||
"""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
from ironic.conductor import task_manager
|
||||
|
@ -16,7 +16,7 @@
|
||||
Test class for iRMC Power Driver
|
||||
"""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.common import states
|
||||
|
@ -16,7 +16,7 @@
|
||||
Test class for IRMC RAID configuration
|
||||
"""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.conductor import task_manager
|
||||
|
@ -10,7 +10,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
|
@ -10,7 +10,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from neutronclient.common import exceptions as neutron_exceptions
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import uuidutils
|
||||
|
@ -11,8 +11,8 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from neutronclient.common import exceptions as neutron_exceptions
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import uuidutils
|
||||
|
@ -12,7 +12,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import importutils
|
||||
|
||||
from ironic.common import exception
|
||||
|
@ -14,8 +14,8 @@
|
||||
# under the License.
|
||||
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_utils import importutils
|
||||
|
||||
from ironic.common import boot_devices
|
||||
|
@ -13,7 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import importutils
|
||||
from oslo_utils import units
|
||||
|
||||
|
@ -13,7 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import importutils
|
||||
|
||||
from ironic.common import boot_devices
|
||||
|
@ -13,7 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import importutils
|
||||
|
||||
from ironic.common import exception
|
||||
|
@ -16,8 +16,8 @@
|
||||
import collections
|
||||
import copy
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import importutils
|
||||
import requests
|
||||
|
@ -12,7 +12,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
from ironic.common import cinder as cinder_common
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.conductor import task_manager
|
||||
|
@ -13,8 +13,8 @@
|
||||
# limitations under the License.
|
||||
|
||||
import types
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
|
||||
from ironic.common import dhcp_factory
|
||||
|
@ -15,8 +15,8 @@
|
||||
|
||||
import time
|
||||
import types
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from testtools import matchers
|
||||
|
||||
|
@ -14,8 +14,8 @@
|
||||
|
||||
from http import client as http_client
|
||||
import json
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import requests
|
||||
import retrying
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from ironic.common import boot_modes
|
||||
from ironic.drivers.modules import boot_mode_utils
|
||||
|
@ -26,9 +26,9 @@ import string
|
||||
import subprocess
|
||||
import tempfile
|
||||
import time
|
||||
from unittest import mock
|
||||
|
||||
from ironic_lib import utils as ironic_utils
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_service import loopingcall
|
||||
from oslo_utils import netutils
|
||||
|
@ -16,9 +16,9 @@
|
||||
|
||||
import os
|
||||
import tempfile
|
||||
from unittest import mock
|
||||
|
||||
import fixtures
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import fileutils
|
||||
from oslo_utils import uuidutils
|
||||
|
@ -20,9 +20,9 @@ import datetime
|
||||
import os
|
||||
import tempfile
|
||||
import time
|
||||
from unittest import mock
|
||||
import uuid
|
||||
|
||||
import mock
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
from ironic.common import exception
|
||||
|
@ -14,7 +14,8 @@
|
||||
# under the License.
|
||||
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import importutils
|
||||
|
||||
from ironic.common import exception
|
||||
|
@ -10,8 +10,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from unittest import mock
|
||||
|
||||
import eventlet
|
||||
import mock
|
||||
import openstack
|
||||
|
||||
from ironic.common import context
|
||||
|
@ -28,10 +28,10 @@ import subprocess
|
||||
import tempfile
|
||||
import time
|
||||
import types
|
||||
from unittest import mock
|
||||
|
||||
import fixtures
|
||||
from ironic_lib import utils as ironic_utils
|
||||
import mock
|
||||
from oslo_concurrency import processutils
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user