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: I76e01d55ff4d9095a6dbf520752042824225de73
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-04-18 11:57:01 -05:00
parent 3c95bd58a0
commit 6a4d27f7b7
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
15 changed files with 17 additions and 15 deletions

View File

@ -16,9 +16,9 @@
import json
import os
import sys
from unittest import mock
import ddt
import mock
import six
from osprofiler.cmd import shell

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from osprofiler.drivers.elasticsearch_driver import ElasticsearchDriver
from osprofiler.tests import test

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from osprofiler.drivers import jaeger
from osprofiler.tests import test

View File

@ -14,9 +14,9 @@
# under the License.
import json
from unittest import mock
import ddt
import mock
from osprofiler.drivers import loginsight
from osprofiler import exc

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from osprofiler.drivers import base
from osprofiler.tests import test

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from osprofiler.drivers.mongodb import MongoDB
from osprofiler.tests import test

View File

@ -14,7 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from oslo_serialization import jsonutils
from osprofiler.drivers.redis_driver import Redis

View File

@ -10,8 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
import testtools
from unittest import mock
from osprofiler import initializer

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from osprofiler import notifier
from osprofiler.tests import test

View File

@ -13,7 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from oslo_config import fixture
from osprofiler import opts

View File

@ -17,8 +17,8 @@ import collections
import copy
import datetime
import re
from unittest import mock
import mock
import six
from osprofiler import profiler

View File

@ -14,8 +14,8 @@
# under the License.
import contextlib
from unittest import mock
import mock
from osprofiler import sqlalchemy
from osprofiler.tests import test

View File

@ -16,9 +16,9 @@
import base64
import hashlib
import hmac
from unittest import mock
import uuid
import mock
from osprofiler import _utils as utils
from osprofiler.tests import test

View File

@ -13,7 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from webob import response as webob_response
from osprofiler import _utils as utils

View File

@ -2,7 +2,6 @@ hacking>=3.0,<3.1.0 # Apache-2.0
coverage>=4.0 # Apache-2.0
ddt>=1.0.1 # MIT
mock>=2.0.0 # BSD
stestr>=2.0.0 # Apache-2.0
testtools>=2.2.0 # MIT