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:
parent
3c95bd58a0
commit
6a4d27f7b7
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -17,8 +17,8 @@ import collections
|
|||
import copy
|
||||
import datetime
|
||||
import re
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import six
|
||||
|
||||
from osprofiler import profiler
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
# under the License.
|
||||
|
||||
import contextlib
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
|
||||
from osprofiler import sqlalchemy
|
||||
from osprofiler.tests import test
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue