Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library unittest.mock module instead of the third party mock lib. The remainder was auto-generated with the following (hacky) script, with one or two manual tweaks after the fact: import glob for path in glob.glob('watcher/tests/**/*.py', recursive=True): with open(path) as fh: lines = fh.readlines() if 'import mock\n' not in lines: continue import_group_found = False create_first_party_group = False for num, line in enumerate(lines): line = line.strip() if line.startswith('import ') or line.startswith('from '): tokens = line.split() for lib in ( 'ddt', 'six', 'webob', 'fixtures', 'testtools' 'neutron', 'cinder', 'ironic', 'keystone', 'oslo', ): if lib in tokens[1]: create_first_party_group = True break if create_first_party_group: break import_group_found = True if not import_group_found: continue if line.startswith('import ') or line.startswith('from '): tokens = line.split() if tokens[1] > 'unittest': break elif tokens[1] == 'unittest' and ( len(tokens) == 2 or tokens[4] > 'mock' ): break elif not line: break if create_first_party_group: lines.insert(num, 'from unittest import mock\n\n') else: lines.insert(num, 'from unittest import mock\n') del lines[lines.index('import mock\n')] with open(path, 'w+') as fh: fh.writelines(lines) Co-Authored-By: Sean McGinnis <sean.mcginnis@gmail.com> Change-Id: Icf35d3a6c10c529e07d1a4edaa36f504e5bf553a
This commit is contained in:
parent
6ff95efaf6
commit
8a36ad5f87
|
@ -6,7 +6,6 @@ coverage>=4.5.1 # Apache-2.0
|
|||
doc8>=0.8.0 # Apache-2.0
|
||||
freezegun>=0.3.10 # Apache-2.0
|
||||
hacking>=3.0.1,<3.1.0 # Apache-2.0
|
||||
mock>=2.0.0 # BSD
|
||||
oslotest>=3.3.0 # Apache-2.0
|
||||
os-testr>=1.0.0 # Apache-2.0
|
||||
testscenarios>=0.5.0 # Apache-2.0/BSD
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
# NOTE(deva): import auth_token so we can override a config option
|
||||
|
||||
import copy
|
||||
import mock
|
||||
from unittest import mock
|
||||
from urllib import parse as urlparse
|
||||
|
||||
from oslo_config import cfg
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
|
||||
"""Tests for the Pecan API hooks."""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
import oslo_messaging as messaging
|
||||
from oslo_serialization import jsonutils
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
from apscheduler.schedulers import background
|
||||
import datetime
|
||||
import freezegun
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.api import scheduling
|
||||
from watcher.notifications import service
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
import datetime
|
||||
import itertools
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_serialization import jsonutils
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
import datetime
|
||||
import itertools
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_serialization import jsonutils
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
import datetime
|
||||
import itertools
|
||||
import mock
|
||||
from unittest import mock
|
||||
from urllib import parse as urlparse
|
||||
from webtest.app import AppError
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
import datetime
|
||||
from dateutil import tz
|
||||
import itertools
|
||||
import mock
|
||||
from unittest import mock
|
||||
from urllib import parse as urlparse
|
||||
|
||||
from oslo_config import cfg
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
from urllib import parse as urlparse
|
||||
|
||||
from oslo_config import cfg
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
import webtest
|
||||
import wsme
|
||||
from wsme import types as wtypes
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.decision_engine import rpcapi as deapi
|
||||
from watcher import objects
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.applier.action_plan import default
|
||||
from watcher.applier import default as ap_applier
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
import jsonschema
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.applier.actions import base as baction
|
||||
from watcher.applier.actions import change_node_power_state
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
import jsonschema
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.applier.actions import base as baction
|
||||
from watcher.applier.actions import change_nova_service_state
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
import jsonschema
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.applier.actions import base as baction
|
||||
from watcher.applier.actions import migration
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
import jsonschema
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.applier.actions import base as baction
|
||||
from watcher.applier.actions import resize
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
|
||||
import jsonschema
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.applier.actions import sleep
|
||||
from watcher.tests import base
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
import jsonschema
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.applier.actions import base as baction
|
||||
from watcher.applier.actions import volume_migration
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#
|
||||
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.applier.messaging import trigger
|
||||
from watcher.common import utils
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
import oslo_messaging as om
|
||||
from watcher.applier import manager as applier_manager
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
import oslo_messaging as om
|
||||
from watcher.applier import rpcapi
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
# See the 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,7 +17,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
import abc
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.applier.actions import base as abase
|
||||
from watcher.applier.actions import factory
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
import eventlet
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.applier.workflow_engine import default as tflow
|
||||
from watcher.common import clients
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
import copy
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log
|
||||
from oslo_messaging import conffixture
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
# limitations under the License.
|
||||
|
||||
import types
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_service import wsgi
|
||||
from pecan.testing import load_test_app
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
# limitations under the License.
|
||||
|
||||
import types
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_service import service
|
||||
from watcher.applier import sync
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
# limitations under the License.
|
||||
|
||||
import sys
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
|
||||
from watcher.cmd import dbmanage
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
# limitations under the License.
|
||||
|
||||
import types
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_service import service
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from stevedore import driver as drivermanager
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
import time
|
||||
from unittest import mock
|
||||
|
||||
from cinderclient import exceptions as cinder_exception
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
|
||||
from ceilometerclient import client as ceclient
|
||||
import ceilometerclient.v2.client as ceclient_v2
|
||||
from unittest import mock
|
||||
|
||||
from cinderclient import client as ciclient
|
||||
from cinderclient.v3 import client as ciclient_v3
|
||||
from glanceclient import client as glclient
|
||||
|
@ -21,7 +23,6 @@ from ironicclient import client as irclient
|
|||
from ironicclient.v1 import client as irclient_v1
|
||||
from keystoneauth1 import adapter as ka_adapter
|
||||
from keystoneauth1 import loading as ka_loading
|
||||
import mock
|
||||
from monascaclient import client as monclient
|
||||
from monascaclient.v2_0 import client as monclient_v2
|
||||
from neutronclient.neutron import client as netclient
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.common import clients
|
||||
from watcher.common import exception
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
#
|
||||
|
||||
import time
|
||||
from unittest import mock
|
||||
|
||||
from novaclient import api_versions
|
||||
|
||||
import mock
|
||||
|
||||
import glanceclient.exc as glexceptions
|
||||
import novaclient.exceptions as nvexceptions
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.common import placement_helper
|
||||
from watcher.tests import base
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from stevedore import extension
|
||||
|
||||
|
|
|
@ -14,10 +14,11 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
import freezegun
|
||||
import mock
|
||||
|
||||
from watcher.common import context as watcher_context
|
||||
from watcher.common import utils
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
# limitations under the License.
|
||||
|
||||
import datetime
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.common import cinder_helper
|
||||
from watcher.common import exception
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.decision_engine.model.collector import base
|
||||
from watcher.decision_engine.model import model_root
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
import os_resource_classes as orc
|
||||
from unittest import mock
|
||||
|
||||
from watcher.common import nova_helper
|
||||
from watcher.common import placement_helper
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
# See the 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_log import log
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
import copy
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from watcher.decision_engine.datasources import base as datasource
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.common import clients
|
||||
from watcher.common import exception
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from watcher.common import clients
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
# See the 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_log import log
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from mock import MagicMock
|
||||
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from watcher.common import clients
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from stevedore import driver as drivermanager
|
||||
from stevedore import extension as stevedore_extension
|
||||
from unittest import mock
|
||||
|
||||
from watcher.common import clients
|
||||
from watcher.common import exception
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from stevedore import extension
|
||||
from unittest import mock
|
||||
|
||||
from watcher.common import exception
|
||||
from watcher.decision_engine.loading import default as default_loading
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from stevedore import extension
|
||||
from unittest import mock
|
||||
|
||||
from watcher.common import exception
|
||||
from watcher.decision_engine.goal import goals
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.decision_engine.audit import continuous as continuous_handler
|
||||
from watcher.decision_engine.audit import oneshot as oneshot_handler
|
||||
|
|
|
@ -13,8 +13,9 @@
|
|||
# implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
import mock
|
||||
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
from watcher.common import exception
|
||||
from watcher.common import utils
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
# limitations under the License.
|
||||
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
|
||||
from watcher.decision_engine.model.collector import base
|
||||
from watcher.decision_engine.model import model_root as modelroot
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
# limitations under the License.
|
||||
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
|
||||
from watcher.common import utils
|
||||
from watcher.decision_engine.model.collector import base
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
|
||||
import datetime
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from watcher.common import cinder_helper
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
# limitations under the License.
|
||||
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from watcher.common import context
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
import os
|
||||
import os_resource_classes as orc
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from watcher.common import context
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.common import exception
|
||||
from watcher.common import utils
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.common import nova_helper
|
||||
from watcher.common import utils
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.common import exception
|
||||
from watcher.common import nova_helper
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.decision_engine.scope import baremetal
|
||||
from watcher.tests import base
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#
|
||||
|
||||
from jsonschema import validators
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.api.controllers.v1 import audit_template
|
||||
from watcher.common import exception
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.common import cinder_helper
|
||||
from watcher.common import exception
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.decision_engine.solution import default
|
||||
from watcher.decision_engine.strategy import strategies
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.common import utils
|
||||
from watcher.decision_engine.model.collector import manager
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.common import exception
|
||||
from watcher.decision_engine.loading import default as default_loader
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.common import utils
|
||||
from watcher.decision_engine.strategy import strategies
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.common import exception
|
||||
from watcher.decision_engine.datasources import manager
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#
|
||||
import collections
|
||||
import copy
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.applier.loading import default
|
||||
from watcher.common import clients
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.applier.loading import default
|
||||
from watcher.common import utils
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.applier.loading import default
|
||||
from watcher.common import utils
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.common import exception
|
||||
from watcher.decision_engine.model import element
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.common import exception
|
||||
from watcher.decision_engine.model import element
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
import collections
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.applier.loading import default
|
||||
from watcher.common import utils
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
import collections
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.applier.loading import default
|
||||
from watcher.common import utils
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.common import clients
|
||||
from watcher.common import utils
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
|
||||
from watcher.common import cinder_helper
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.decision_engine.strategy.strategies import base as strategy_base
|
||||
from watcher.tests import base
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
import collections
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.applier.loading import default
|
||||
from watcher.common import utils
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.decision_engine.model import element
|
||||
from watcher.decision_engine.solution.base import BaseSolution
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
import collections
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.applier.loading import default
|
||||
from watcher.common import utils
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.common import clients
|
||||
from watcher.common import utils
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
import collections
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
import cinderclient
|
||||
import novaclient
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher.decision_engine import gmr
|
||||
from watcher.decision_engine.model.collector import manager
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
import oslo_messaging as om
|
||||
from watcher.common import exception
|
||||
from watcher.common import utils
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
from apscheduler.schedulers import background
|
||||
from apscheduler.triggers import interval as interval_trigger
|
||||
import eventlet
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import uuidutils
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
import requests
|
||||
from unittest import mock
|
||||
|
||||
fakeAuthTokenHeaders = {'X-User-Id': u'773a902f022949619b5c2f32cd89d419',
|
||||
'X-Roles': u'admin, ResellerAdmin, _member_',
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
# under the License.
|
||||
|
||||
import freezegun
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
import oslo_messaging as om
|
||||
|
||||
from watcher.common import exception
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
# under the License.
|
||||
|
||||
import freezegun
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
import oslo_messaging as om
|
||||
|
||||
from watcher.common import exception
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
# under the License.
|
||||
|
||||
import freezegun
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
import oslo_messaging as om
|
||||
|
||||
from watcher.common import exception
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
# under the License.
|
||||
|
||||
import collections
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_versionedobjects import fixture
|
||||
|
||||
from watcher.common import exception
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
# limitations under the License.
|
||||
|
||||
import datetime
|
||||
from unittest import mock
|
||||
|
||||
import freezegun
|
||||
import mock
|
||||
import oslo_messaging as om
|
||||
|
||||
from watcher.common import rpc
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
# under the License.
|
||||
|
||||
import datetime
|
||||
from unittest import mock
|
||||
|
||||
import iso8601
|
||||
import mock
|
||||
|
||||
from watcher.common import exception
|
||||
from watcher.common import utils as c_utils
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
# under the License.
|
||||
|
||||
import datetime
|
||||
from unittest import mock
|
||||
|
||||
import iso8601
|
||||
import mock
|
||||
|
||||
from watcher.db.sqlalchemy import api as db_api
|
||||
from watcher import objects
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue