diff options
Diffstat (limited to 'trove/tests/unittests')
51 files changed, 98 insertions, 98 deletions
diff --git a/trove/tests/unittests/api/common/test_limits.py b/trove/tests/unittests/api/common/test_limits.py index 8921422f..2cf3be08 100644 --- a/trove/tests/unittests/api/common/test_limits.py +++ b/trove/tests/unittests/api/common/test_limits.py @@ -18,7 +18,7 @@ Tests dealing with HTTP rate-limiting. """ -from mock import Mock, MagicMock, patch +from unittest.mock import Mock, MagicMock, patch from oslo_serialization import jsonutils import six from six.moves import http_client diff --git a/trove/tests/unittests/api/test_versions.py b/trove/tests/unittests/api/test_versions.py index ca44f795..4c6aca39 100644 --- a/trove/tests/unittests/api/test_versions.py +++ b/trove/tests/unittests/api/test_versions.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from mock import Mock +from unittest.mock import Mock import webob from trove.common import cfg diff --git a/trove/tests/unittests/backup/test_backup_models.py b/trove/tests/unittests/backup/test_backup_models.py index 98d44476..4cc9d113 100644 --- a/trove/tests/unittests/backup/test_backup_models.py +++ b/trove/tests/unittests/backup/test_backup_models.py @@ -13,9 +13,9 @@ import datetime -from mock import DEFAULT -from mock import MagicMock -from mock import patch +from unittest.mock import DEFAULT +from unittest.mock import MagicMock +from unittest.mock import patch from swiftclient.client import ClientException from trove.backup import models diff --git a/trove/tests/unittests/cluster/test_cassandra_cluster.py b/trove/tests/unittests/cluster/test_cassandra_cluster.py index 29346878..a7c439d9 100644 --- a/trove/tests/unittests/cluster/test_cassandra_cluster.py +++ b/trove/tests/unittests/cluster/test_cassandra_cluster.py @@ -13,10 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. -from mock import ANY -from mock import MagicMock -from mock import Mock -from mock import patch +from unittest.mock import ANY +from unittest.mock import MagicMock +from unittest.mock import Mock +from unittest.mock import patch from trove.cluster import models from trove.common.strategies.cluster.experimental.cassandra.api \ diff --git a/trove/tests/unittests/cluster/test_cluster.py b/trove/tests/unittests/cluster/test_cluster.py index 29df4ee8..eec5b3cd 100644 --- a/trove/tests/unittests/cluster/test_cluster.py +++ b/trove/tests/unittests/cluster/test_cluster.py @@ -15,8 +15,8 @@ import uuid -from mock import Mock -from mock import patch +from unittest.mock import Mock +from unittest.mock import patch from trove.cluster.models import Cluster from trove.cluster.models import ClusterTasks from trove.cluster.models import DBCluster diff --git a/trove/tests/unittests/cluster/test_cluster_controller.py b/trove/tests/unittests/cluster/test_cluster_controller.py index 4d512b93..59dfc6a9 100644 --- a/trove/tests/unittests/cluster/test_cluster_controller.py +++ b/trove/tests/unittests/cluster/test_cluster_controller.py @@ -15,9 +15,9 @@ # import jsonschema -from mock import MagicMock -from mock import Mock -from mock import patch +from unittest.mock import MagicMock +from unittest.mock import Mock +from unittest.mock import patch from testtools.matchers import Is, Equals from trove.cluster import models from trove.cluster.models import Cluster, DBCluster diff --git a/trove/tests/unittests/cluster/test_cluster_models.py b/trove/tests/unittests/cluster/test_cluster_models.py index d03d9823..75a0967e 100644 --- a/trove/tests/unittests/cluster/test_cluster_models.py +++ b/trove/tests/unittests/cluster/test_cluster_models.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from mock import Mock, patch +from unittest.mock import Mock, patch from trove.cluster import models from trove.common.strategies.cluster.experimental.mongodb.api import ( diff --git a/trove/tests/unittests/cluster/test_cluster_pxc_controller.py b/trove/tests/unittests/cluster/test_cluster_pxc_controller.py index 89edc3c9..24c29cff 100644 --- a/trove/tests/unittests/cluster/test_cluster_pxc_controller.py +++ b/trove/tests/unittests/cluster/test_cluster_pxc_controller.py @@ -13,9 +13,9 @@ import jsonschema -from mock import MagicMock -from mock import Mock -from mock import patch +from unittest.mock import MagicMock +from unittest.mock import Mock +from unittest.mock import patch from testtools.matchers import Is, Equals from trove.cluster import models from trove.cluster.models import Cluster diff --git a/trove/tests/unittests/cluster/test_cluster_redis_controller.py b/trove/tests/unittests/cluster/test_cluster_redis_controller.py index 80159ceb..e8e931c9 100644 --- a/trove/tests/unittests/cluster/test_cluster_redis_controller.py +++ b/trove/tests/unittests/cluster/test_cluster_redis_controller.py @@ -13,9 +13,9 @@ import jsonschema -from mock import MagicMock -from mock import Mock -from mock import patch +from unittest.mock import MagicMock +from unittest.mock import Mock +from unittest.mock import patch from testtools.matchers import Is, Equals from trove.cluster import models from trove.cluster.models import Cluster diff --git a/trove/tests/unittests/cluster/test_cluster_vertica_controller.py b/trove/tests/unittests/cluster/test_cluster_vertica_controller.py index 89298701..9d656a7e 100644 --- a/trove/tests/unittests/cluster/test_cluster_vertica_controller.py +++ b/trove/tests/unittests/cluster/test_cluster_vertica_controller.py @@ -13,9 +13,9 @@ import jsonschema -from mock import MagicMock -from mock import Mock -from mock import patch +from unittest.mock import MagicMock +from unittest.mock import Mock +from unittest.mock import patch from testtools.matchers import Is, Equals from trove.cluster import models from trove.cluster.models import Cluster diff --git a/trove/tests/unittests/cluster/test_cluster_views.py b/trove/tests/unittests/cluster/test_cluster_views.py index bf061f27..9833da96 100644 --- a/trove/tests/unittests/cluster/test_cluster_views.py +++ b/trove/tests/unittests/cluster/test_cluster_views.py @@ -14,9 +14,9 @@ # under the License. # -from mock import MagicMock -from mock import Mock -from mock import patch +from unittest.mock import MagicMock +from unittest.mock import Mock +from unittest.mock import patch from trove.cluster.views import ClusterInstanceDetailView from trove.cluster.views import ClusterView diff --git a/trove/tests/unittests/cluster/test_galera_cluster.py b/trove/tests/unittests/cluster/test_galera_cluster.py index 2557c25d..2a5cca11 100644 --- a/trove/tests/unittests/cluster/test_galera_cluster.py +++ b/trove/tests/unittests/cluster/test_galera_cluster.py @@ -13,8 +13,8 @@ import uuid -from mock import Mock -from mock import patch +from unittest.mock import Mock +from unittest.mock import patch from novaclient import exceptions as nova_exceptions diff --git a/trove/tests/unittests/cluster/test_models.py b/trove/tests/unittests/cluster/test_models.py index 6a853e08..13040b6a 100644 --- a/trove/tests/unittests/cluster/test_models.py +++ b/trove/tests/unittests/cluster/test_models.py @@ -13,13 +13,13 @@ # License for the specific language governing permissions and limitations # under the License. -from mock import ANY -from mock import call -from mock import DEFAULT -from mock import MagicMock -from mock import Mock -from mock import patch -from mock import PropertyMock +from unittest.mock import ANY +from unittest.mock import call +from unittest.mock import DEFAULT +from unittest.mock import MagicMock +from unittest.mock import Mock +from unittest.mock import patch +from unittest.mock import PropertyMock from neutronclient.common import exceptions as neutron_exceptions diff --git a/trove/tests/unittests/cluster/test_redis_cluster.py b/trove/tests/unittests/cluster/test_redis_cluster.py index 3893404f..5f4e7650 100644 --- a/trove/tests/unittests/cluster/test_redis_cluster.py +++ b/trove/tests/unittests/cluster/test_redis_cluster.py @@ -13,8 +13,8 @@ import uuid -from mock import Mock -from mock import patch +from unittest.mock import Mock +from unittest.mock import patch from novaclient import exceptions as nova_exceptions from trove.cluster.models import Cluster from trove.cluster.models import ClusterTasks diff --git a/trove/tests/unittests/cluster/test_vertica_cluster.py b/trove/tests/unittests/cluster/test_vertica_cluster.py index 348a1887..8ef2301c 100644 --- a/trove/tests/unittests/cluster/test_vertica_cluster.py +++ b/trove/tests/unittests/cluster/test_vertica_cluster.py @@ -13,8 +13,8 @@ import uuid -from mock import Mock -from mock import patch +from unittest.mock import Mock +from unittest.mock import patch from novaclient import exceptions as nova_exceptions from trove.cluster.models import Cluster from trove.cluster.models import ClusterTasks diff --git a/trove/tests/unittests/cmd/test_status.py b/trove/tests/unittests/cmd/test_status.py index 7a94d74e..86ab40bc 100644 --- a/trove/tests/unittests/cmd/test_status.py +++ b/trove/tests/unittests/cmd/test_status.py @@ -12,8 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. -from mock import Mock -from mock import patch +from unittest.mock import Mock +from unittest.mock import patch from oslo_upgradecheck.upgradecheck import Code from trove.cmd import status diff --git a/trove/tests/unittests/common/test_context.py b/trove/tests/unittests/common/test_context.py index e566c8b2..d3f237dd 100644 --- a/trove/tests/unittests/common/test_context.py +++ b/trove/tests/unittests/common/test_context.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. # -from mock import Mock +from unittest.mock import Mock from testtools.matchers import Equals, Is from trove.common import context diff --git a/trove/tests/unittests/common/test_notification.py b/trove/tests/unittests/common/test_notification.py index 02437408..3f27c71e 100644 --- a/trove/tests/unittests/common/test_notification.py +++ b/trove/tests/unittests/common/test_notification.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. # -from mock import Mock, patch +from unittest.mock import Mock, patch from oslo_utils import timeutils diff --git a/trove/tests/unittests/common/test_pagination.py b/trove/tests/unittests/common/test_pagination.py index d27726f5..24dab84c 100644 --- a/trove/tests/unittests/common/test_pagination.py +++ b/trove/tests/unittests/common/test_pagination.py @@ -16,7 +16,7 @@ # under the License. # -from mock import Mock +from unittest.mock import Mock from trove.common import pagination from trove.tests.unittests import trove_testtools diff --git a/trove/tests/unittests/common/test_policy.py b/trove/tests/unittests/common/test_policy.py index 016e9e0e..beb27f86 100644 --- a/trove/tests/unittests/common/test_policy.py +++ b/trove/tests/unittests/common/test_policy.py @@ -13,9 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from mock import MagicMock -from mock import NonCallableMock -from mock import patch +from unittest.mock import MagicMock +from unittest.mock import NonCallableMock +from unittest.mock import patch from trove.common import exception as trove_exceptions from trove.common import policy as trove_policy diff --git a/trove/tests/unittests/common/test_server_group.py b/trove/tests/unittests/common/test_server_group.py index a05826fb..bb179dd4 100644 --- a/trove/tests/unittests/common/test_server_group.py +++ b/trove/tests/unittests/common/test_server_group.py @@ -15,7 +15,7 @@ # import copy -from mock import Mock, patch +from unittest.mock import Mock, patch from trove.common import server_group as srv_grp from trove.tests.unittests import trove_testtools diff --git a/trove/tests/unittests/common/test_template.py b/trove/tests/unittests/common/test_template.py index 18f227bf..31c49d6f 100644 --- a/trove/tests/unittests/common/test_template.py +++ b/trove/tests/unittests/common/test_template.py @@ -11,7 +11,7 @@ # limitations under the License. import re -from mock import Mock +from unittest.mock import Mock from trove.common import template from trove.datastore.models import DatastoreVersion diff --git a/trove/tests/unittests/common/test_utils.py b/trove/tests/unittests/common/test_utils.py index e334dec5..c81cd679 100644 --- a/trove/tests/unittests/common/test_utils.py +++ b/trove/tests/unittests/common/test_utils.py @@ -14,8 +14,8 @@ # under the License. # -from mock import Mock -from mock import patch +from unittest.mock import Mock +from unittest.mock import patch from testtools import ExpectedException from trove.common import exception diff --git a/trove/tests/unittests/common/test_wsgi.py b/trove/tests/unittests/common/test_wsgi.py index 9a07e009..324078da 100644 --- a/trove/tests/unittests/common/test_wsgi.py +++ b/trove/tests/unittests/common/test_wsgi.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. # -from mock import Mock, patch +from unittest.mock import Mock, patch from testtools.matchers import Equals, Is, Not import webob.exc diff --git a/trove/tests/unittests/conductor/test_conf.py b/trove/tests/unittests/conductor/test_conf.py index a26587e5..cdeb39da 100644 --- a/trove/tests/unittests/conductor/test_conf.py +++ b/trove/tests/unittests/conductor/test_conf.py @@ -12,8 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. -from mock import MagicMock -from mock import patch +from unittest.mock import MagicMock +from unittest.mock import patch from oslo_service import service as os_service from trove.cmd import common as common_cmd diff --git a/trove/tests/unittests/conductor/test_methods.py b/trove/tests/unittests/conductor/test_methods.py index 64ba117e..887af439 100644 --- a/trove/tests/unittests/conductor/test_methods.py +++ b/trove/tests/unittests/conductor/test_methods.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from mock import patch +from unittest.mock import patch from oslo_utils import timeutils from trove.backup import models as bkup_models diff --git a/trove/tests/unittests/configuration/test_configuration_controller.py b/trove/tests/unittests/configuration/test_configuration_controller.py index 9d1de61e..4c239672 100644 --- a/trove/tests/unittests/configuration/test_configuration_controller.py +++ b/trove/tests/unittests/configuration/test_configuration_controller.py @@ -14,7 +14,7 @@ # under the License. # import jsonschema -from mock import MagicMock +from unittest.mock import MagicMock from trove.common import configurations from trove.common.exception import UnprocessableEntity diff --git a/trove/tests/unittests/datastore/test_datastore.py b/trove/tests/unittests/datastore/test_datastore.py index 2555fdab..4812c442 100644 --- a/trove/tests/unittests/datastore/test_datastore.py +++ b/trove/tests/unittests/datastore/test_datastore.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from mock import Mock -from mock import patch +from unittest.mock import Mock +from unittest.mock import patch from trove.common import exception from trove.datastore import models as datastore_models diff --git a/trove/tests/unittests/db/test_migration_utils.py b/trove/tests/unittests/db/test_migration_utils.py index ccc91a58..3c694c8b 100644 --- a/trove/tests/unittests/db/test_migration_utils.py +++ b/trove/tests/unittests/db/test_migration_utils.py @@ -13,9 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. # -from mock import call -from mock import Mock -from mock import patch +from unittest.mock import call +from unittest.mock import Mock +from unittest.mock import patch from sqlalchemy.engine import reflection from sqlalchemy.schema import Column diff --git a/trove/tests/unittests/domain-name-service/test_designate_driver.py b/trove/tests/unittests/domain-name-service/test_designate_driver.py index fd77b468..7a464e0b 100644 --- a/trove/tests/unittests/domain-name-service/test_designate_driver.py +++ b/trove/tests/unittests/domain-name-service/test_designate_driver.py @@ -14,8 +14,8 @@ import base64 import hashlib -from mock import MagicMock -from mock import patch +from unittest.mock import MagicMock +from unittest.mock import patch import six from trove.common import exception diff --git a/trove/tests/unittests/extensions/common/test_service.py b/trove/tests/unittests/extensions/common/test_service.py index c9341337..ecb61f21 100644 --- a/trove/tests/unittests/extensions/common/test_service.py +++ b/trove/tests/unittests/extensions/common/test_service.py @@ -14,8 +14,8 @@ # under the License. # -from mock import Mock -from mock import patch +from unittest.mock import Mock +from unittest.mock import patch from oslo_config.cfg import NoSuchOptError from trove.common import exception diff --git a/trove/tests/unittests/extensions/redis/test_service.py b/trove/tests/unittests/extensions/redis/test_service.py index ad98b30f..0b8b60aa 100644 --- a/trove/tests/unittests/extensions/redis/test_service.py +++ b/trove/tests/unittests/extensions/redis/test_service.py @@ -15,7 +15,7 @@ # import uuid -from mock import Mock, patch +from unittest.mock import Mock, patch from trove.common import exception from trove.datastore import models as datastore_models diff --git a/trove/tests/unittests/flavor/test_flavor_views.py b/trove/tests/unittests/flavor/test_flavor_views.py index 21b86351..87c68981 100644 --- a/trove/tests/unittests/flavor/test_flavor_views.py +++ b/trove/tests/unittests/flavor/test_flavor_views.py @@ -14,7 +14,7 @@ # under the License. # -from mock import Mock, patch +from unittest.mock import Mock, patch from trove.flavor.views import FlavorView from trove.tests.unittests import trove_testtools diff --git a/trove/tests/unittests/instance/test_instance_controller.py b/trove/tests/unittests/instance/test_instance_controller.py index fe008306..f222ddac 100644 --- a/trove/tests/unittests/instance/test_instance_controller.py +++ b/trove/tests/unittests/instance/test_instance_controller.py @@ -14,10 +14,10 @@ # under the License. # import copy +from unittest.mock import Mock import uuid import jsonschema -from mock import Mock from testtools.matchers import Equals from testtools.matchers import Is from testtools.testcase import skip diff --git a/trove/tests/unittests/instance/test_instance_models.py b/trove/tests/unittests/instance/test_instance_models.py index eab5901b..f63314b5 100644 --- a/trove/tests/unittests/instance/test_instance_models.py +++ b/trove/tests/unittests/instance/test_instance_models.py @@ -11,8 +11,8 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. -from mock import Mock -from mock import patch +from unittest.mock import Mock +from unittest.mock import patch import uuid from trove.backup import models as backup_models diff --git a/trove/tests/unittests/instance/test_instance_views.py b/trove/tests/unittests/instance/test_instance_views.py index 2b3f2146..43b6a2c2 100644 --- a/trove/tests/unittests/instance/test_instance_views.py +++ b/trove/tests/unittests/instance/test_instance_views.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. # -from mock import Mock +from unittest.mock import Mock from trove.common import cfg from trove.instance.views import InstanceDetailView from trove.instance.views import InstanceView diff --git a/trove/tests/unittests/mgmt/test_clusters.py b/trove/tests/unittests/mgmt/test_clusters.py index 01978745..fba3dc7b 100644 --- a/trove/tests/unittests/mgmt/test_clusters.py +++ b/trove/tests/unittests/mgmt/test_clusters.py @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from mock import Mock, patch +from unittest.mock import Mock, patch from trove.common import exception from trove.extensions.mgmt.clusters.models import MgmtCluster diff --git a/trove/tests/unittests/mgmt/test_datastore_controller.py b/trove/tests/unittests/mgmt/test_datastore_controller.py index a465692b..7e5b01c4 100644 --- a/trove/tests/unittests/mgmt/test_datastore_controller.py +++ b/trove/tests/unittests/mgmt/test_datastore_controller.py @@ -14,7 +14,7 @@ import jsonschema -from mock import Mock, patch, MagicMock, PropertyMock +from unittest.mock import Mock, patch, MagicMock, PropertyMock from testtools.matchers import Is, Equals from trove.common import clients diff --git a/trove/tests/unittests/mgmt/test_datastores.py b/trove/tests/unittests/mgmt/test_datastores.py index 2d1405a6..c3b5ad72 100644 --- a/trove/tests/unittests/mgmt/test_datastores.py +++ b/trove/tests/unittests/mgmt/test_datastores.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from mock import Mock, patch +from unittest.mock import Mock, patch from glanceclient import exc as glance_exceptions from trove.common import clients diff --git a/trove/tests/unittests/mgmt/test_models.py b/trove/tests/unittests/mgmt/test_models.py index e51e7d70..6c0883c2 100644 --- a/trove/tests/unittests/mgmt/test_models.py +++ b/trove/tests/unittests/mgmt/test_models.py @@ -18,9 +18,9 @@ from testtools.matchers import Is from testtools.matchers import Not import uuid -from mock import ANY -from mock import MagicMock -from mock import patch +from unittest.mock import ANY +from unittest.mock import MagicMock +from unittest.mock import patch from novaclient.client import Client from novaclient.v2.flavors import Flavor from novaclient.v2.flavors import FlavorManager diff --git a/trove/tests/unittests/module/test_module_models.py b/trove/tests/unittests/module/test_module_models.py index 330694e0..1aeb2e5c 100644 --- a/trove/tests/unittests/module/test_module_models.py +++ b/trove/tests/unittests/module/test_module_models.py @@ -15,7 +15,7 @@ # import copy -from mock import Mock, patch +from unittest.mock import Mock, patch from trove.common import crypto_utils from trove.common import exception diff --git a/trove/tests/unittests/module/test_module_views.py b/trove/tests/unittests/module/test_module_views.py index b976b9cd..5691d1a5 100644 --- a/trove/tests/unittests/module/test_module_views.py +++ b/trove/tests/unittests/module/test_module_views.py @@ -14,7 +14,7 @@ # under the License. # -from mock import Mock, patch +from unittest.mock import Mock, patch from trove.datastore import models from trove.module.views import DetailedModuleView from trove.tests.unittests import trove_testtools diff --git a/trove/tests/unittests/quota/test_quota.py b/trove/tests/unittests/quota/test_quota.py index 9d33e31d..7533a59c 100644 --- a/trove/tests/unittests/quota/test_quota.py +++ b/trove/tests/unittests/quota/test_quota.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from mock import Mock, MagicMock, patch +from unittest.mock import Mock, MagicMock, patch from testtools import skipIf from trove.common import cfg diff --git a/trove/tests/unittests/taskmanager/test_api.py b/trove/tests/unittests/taskmanager/test_api.py index bf265f40..d14f64fd 100644 --- a/trove/tests/unittests/taskmanager/test_api.py +++ b/trove/tests/unittests/taskmanager/test_api.py @@ -14,8 +14,8 @@ # License for the specific language governing permissions and limitations # under the License. -from mock import Mock -from mock import patch +from unittest.mock import Mock +from unittest.mock import patch from unittest import mock from trove.common import context diff --git a/trove/tests/unittests/taskmanager/test_clusters.py b/trove/tests/unittests/taskmanager/test_clusters.py index 9fa9e0cd..d57afac1 100644 --- a/trove/tests/unittests/taskmanager/test_clusters.py +++ b/trove/tests/unittests/taskmanager/test_clusters.py @@ -15,9 +15,9 @@ import datetime -from mock import MagicMock -from mock import Mock -from mock import patch +from unittest.mock import MagicMock +from unittest.mock import Mock +from unittest.mock import patch from trove.cluster.models import ClusterTasks as ClusterTaskStatus from trove.cluster.models import DBCluster diff --git a/trove/tests/unittests/taskmanager/test_galera_clusters.py b/trove/tests/unittests/taskmanager/test_galera_clusters.py index 5d32ce9e..9afec172 100644 --- a/trove/tests/unittests/taskmanager/test_galera_clusters.py +++ b/trove/tests/unittests/taskmanager/test_galera_clusters.py @@ -13,8 +13,8 @@ import datetime -from mock import Mock -from mock import patch +from unittest.mock import Mock +from unittest.mock import patch from trove.cluster.models import ClusterTasks as ClusterTaskStatus from trove.cluster.models import DBCluster diff --git a/trove/tests/unittests/taskmanager/test_manager.py b/trove/tests/unittests/taskmanager/test_manager.py index 610f79f3..1be02135 100644 --- a/trove/tests/unittests/taskmanager/test_manager.py +++ b/trove/tests/unittests/taskmanager/test_manager.py @@ -14,7 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. -from mock import MagicMock, Mock, patch, PropertyMock +from unittest.mock import MagicMock, Mock, patch, PropertyMock from proboscis.asserts import assert_equal from trove.backup.models import Backup diff --git a/trove/tests/unittests/taskmanager/test_models.py b/trove/tests/unittests/taskmanager/test_models.py index 00338150..07530874 100644 --- a/trove/tests/unittests/taskmanager/test_models.py +++ b/trove/tests/unittests/taskmanager/test_models.py @@ -18,11 +18,11 @@ from unittest import mock from cinderclient import exceptions as cinder_exceptions from cinderclient.v2 import volumes as cinderclient_volumes import cinderclient.v2.client as cinderclient -from mock import call -from mock import MagicMock -from mock import Mock -from mock import patch -from mock import PropertyMock +from unittest.mock import call +from unittest.mock import MagicMock +from unittest.mock import Mock +from unittest.mock import patch +from unittest.mock import PropertyMock import neutronclient.v2_0.client as neutronclient from novaclient import exceptions as nova_exceptions import novaclient.v2.flavors diff --git a/trove/tests/unittests/taskmanager/test_vertica_clusters.py b/trove/tests/unittests/taskmanager/test_vertica_clusters.py index d066f36e..19d6db35 100644 --- a/trove/tests/unittests/taskmanager/test_vertica_clusters.py +++ b/trove/tests/unittests/taskmanager/test_vertica_clusters.py @@ -13,8 +13,8 @@ import datetime -from mock import Mock -from mock import patch +from unittest.mock import Mock +from unittest.mock import patch from trove import rpc from trove.cluster.models import ClusterTasks as ClusterTaskStatus diff --git a/trove/tests/unittests/upgrade/test_controller.py b/trove/tests/unittests/upgrade/test_controller.py index 93d43d2f..da4f07c4 100644 --- a/trove/tests/unittests/upgrade/test_controller.py +++ b/trove/tests/unittests/upgrade/test_controller.py @@ -14,7 +14,7 @@ # under the License. # import jsonschema -from mock import Mock, MagicMock, patch +from unittest.mock import Mock, MagicMock, patch from trove.extensions.mgmt.upgrade.models import UpgradeMessageSender from trove.extensions.mgmt.upgrade.service import UpgradeController diff --git a/trove/tests/unittests/upgrade/test_models.py b/trove/tests/unittests/upgrade/test_models.py index 9a859de6..ff3f2133 100644 --- a/trove/tests/unittests/upgrade/test_models.py +++ b/trove/tests/unittests/upgrade/test_models.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. # -from mock import patch +from unittest.mock import patch from trove.extensions.mgmt.upgrade.models import UpgradeMessageSender from trove import rpc from trove.tests.unittests import trove_testtools |