diff --git a/test-requirements.txt b/test-requirements.txt index 222e763ae..29c32ed7e 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -11,5 +11,4 @@ testscenarios>=0.5.0 # Apache-2.0/BSD testtools>=2.3.0 # MIT stestr>=2.0.0 # Apache-2.0 reno>=2.7.0 # Apache-2.0 -mock>=2.0.0 # BSD zake>=0.1.6 # Apache-2.0 diff --git a/vitrage/tests/functional/api/v1/test_auth.py b/vitrage/tests/functional/api/v1/test_auth.py index d29b2fff2..7e123c636 100644 --- a/vitrage/tests/functional/api/v1/test_auth.py +++ b/vitrage/tests/functional/api/v1/test_auth.py @@ -16,12 +16,12 @@ # noinspection PyPackageRequirements from datetime import datetime +from unittest import mock import uuid from keystonemiddleware import fixture as ksm_fixture # noinspection PyPackageRequirements -import mock from vitrage.tests.functional.api.v1 import FunctionalTest EVENT_DETAILS = { diff --git a/vitrage/tests/functional/api/v1/test_basic.py b/vitrage/tests/functional/api/v1/test_basic.py index a8430fa36..f0f3d0f3b 100644 --- a/vitrage/tests/functional/api/v1/test_basic.py +++ b/vitrage/tests/functional/api/v1/test_basic.py @@ -15,11 +15,11 @@ # limitations under the License. # noinspection PyPackageRequirements +from unittest import mock import uuid from datetime import datetime # noinspection PyPackageRequirements -import mock from six.moves import http_client as httplib from vitrage.tests.functional.api.v1 import FunctionalTest diff --git a/vitrage/tests/functional/api/v1/test_keycloak.py b/vitrage/tests/functional/api/v1/test_keycloak.py index ba7245f5e..22910e6b6 100644 --- a/vitrage/tests/functional/api/v1/test_keycloak.py +++ b/vitrage/tests/functional/api/v1/test_keycloak.py @@ -17,8 +17,8 @@ from datetime import datetime # noinspection PyPackageRequirements import json -import mock import requests_mock +from unittest import mock from vitrage.middleware.keycloak import KeycloakAuth from vitrage.tests.functional.api.v1 import FunctionalTest from webtest import TestRequest diff --git a/vitrage/tests/functional/api/v1/test_noauth.py b/vitrage/tests/functional/api/v1/test_noauth.py index f94c570bb..921ae456e 100755 --- a/vitrage/tests/functional/api/v1/test_noauth.py +++ b/vitrage/tests/functional/api/v1/test_noauth.py @@ -17,7 +17,7 @@ from datetime import datetime # noinspection PyPackageRequirements -import mock +from unittest import mock from vitrage.common.utils import compress_obj from vitrage.storage.sqlalchemy import models diff --git a/vitrage/tests/functional/api/v1/test_service.py b/vitrage/tests/functional/api/v1/test_service.py index baf992984..502f70c1c 100644 --- a/vitrage/tests/functional/api/v1/test_service.py +++ b/vitrage/tests/functional/api/v1/test_service.py @@ -15,11 +15,11 @@ from datetime import datetime import os import socket +from unittest import mock # noinspection PyPackageRequirements from iso8601.iso8601 import UTC # noinspection PyPackageRequirements -import mock from oslo_utils import timeutils # noinspection PyPackageRequirements import webtest diff --git a/vitrage/tests/functional/api/v1/test_status.py b/vitrage/tests/functional/api/v1/test_status.py index baaf884af..94b2e8603 100644 --- a/vitrage/tests/functional/api/v1/test_status.py +++ b/vitrage/tests/functional/api/v1/test_status.py @@ -24,7 +24,7 @@ # License for the specific language governing permissions and limitations # under the License. -import mock +from unittest import mock import oslo_messaging diff --git a/vitrage/tests/functional/api/v1/test_template_versions.py b/vitrage/tests/functional/api/v1/test_template_versions.py index 8782e81ec..44ecfaa05 100644 --- a/vitrage/tests/functional/api/v1/test_template_versions.py +++ b/vitrage/tests/functional/api/v1/test_template_versions.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -import mock +from unittest import mock from vitrage.api_handler.apis.template import TemplateApis from vitrage.evaluator import init_template_schemas diff --git a/vitrage/tests/unit/datasources/prometheus/test_prometheus_driver.py b/vitrage/tests/unit/datasources/prometheus/test_prometheus_driver.py index e205be397..2bf0e77be 100644 --- a/vitrage/tests/unit/datasources/prometheus/test_prometheus_driver.py +++ b/vitrage/tests/unit/datasources/prometheus/test_prometheus_driver.py @@ -13,7 +13,8 @@ # under the License. # noinspection PyPackageRequirements -import mock +from unittest import mock + from oslo_config import cfg # noinspection PyPackageRequirements from testtools import matchers diff --git a/vitrage/tests/unit/storage/test_migrations.py b/vitrage/tests/unit/storage/test_migrations.py index 6fe6075dd..ebffc6167 100644 --- a/vitrage/tests/unit/storage/test_migrations.py +++ b/vitrage/tests/unit/storage/test_migrations.py @@ -13,7 +13,8 @@ from alembic import script import contextlib -import mock +from unittest import mock + from oslo_db.sqlalchemy import enginefacade from oslo_db.sqlalchemy import test_fixtures from oslo_db.sqlalchemy import test_migrations