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.

Change-Id: I4b70b6adbfef1f431bf367e3ee1e385604e38f9a
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-04-18 12:01:34 -05:00
parent 565380c647
commit c901aef1d4
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
10 changed files with 11 additions and 10 deletions

View File

@ -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

View File

@ -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 = {

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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