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: I9f7227ec5ed4d84efd36d87fec7f0536276fc151 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
parent
8a66b89e0f
commit
b3e4ac9554
|
@ -19,11 +19,11 @@ import codecs
|
|||
import os
|
||||
import random
|
||||
import string
|
||||
from unittest import mock
|
||||
|
||||
import falcon
|
||||
from falcon import testing
|
||||
import fixtures
|
||||
import mock
|
||||
from monasca_common.policy import policy_engine as policy
|
||||
from oslo_config import fixture as oo_cfg
|
||||
from oslo_context import fixture as oo_ctx
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from monasca_log_api import config
|
||||
from monasca_log_api.tests import base
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# under the License.
|
||||
|
||||
import falcon
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from monasca_log_api.app.controller import healthchecks
|
||||
from monasca_log_api.healthcheck import kafka_check as healthcheck
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from monasca_common.kafka_lib import client
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@ import datetime
|
|||
import random
|
||||
import simplejson as json
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log
|
||||
import six
|
||||
|
|
|
@ -13,9 +13,10 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import falcon
|
||||
import mock
|
||||
import simplejson as json
|
||||
from unittest import mock
|
||||
|
||||
import falcon
|
||||
|
||||
from monasca_log_api.app.base import exceptions as log_api_exceptions
|
||||
from monasca_log_api.app.controller.api import headers
|
||||
|
|
|
@ -13,8 +13,9 @@
|
|||
# under the License.
|
||||
|
||||
import falcon
|
||||
import mock
|
||||
import simplejson as json
|
||||
from unittest import mock
|
||||
|
||||
from six import PY3
|
||||
|
||||
from monasca_log_api.app.base import exceptions as log_api_exceptions
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from monasca_log_api.monitoring import client
|
||||
from monasca_log_api.tests import base
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from webob import response
|
||||
|
||||
from monasca_log_api.middleware import role_middleware as rm
|
||||
|
|
|
@ -15,10 +15,10 @@
|
|||
|
||||
import datetime
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
from falcon import errors
|
||||
from falcon import testing
|
||||
import mock
|
||||
|
||||
from monasca_log_api.app.base import exceptions
|
||||
from monasca_log_api.app.base import validation
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
import simplejson as json
|
||||
from unittest import mock
|
||||
|
||||
from monasca_log_api.app.controller.api import headers
|
||||
from monasca_log_api.app.controller.v2 import logs as v2_logs
|
||||
|
|
|
@ -9,7 +9,6 @@ bashate>=0.5.1 # Apache-2.0
|
|||
|
||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
mock>=2.0.0 # BSD
|
||||
oslotest>=3.2.0 # Apache-2.0
|
||||
stestr>=1.0.0 # Apache-2.0
|
||||
simplejson>=3.8.1 # MIT
|
||||
|
|
Loading…
Reference in New Issue