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:
Sean McGinnis 2020-04-18 11:54:57 -05:00 committed by Martin Chacon Piza
parent 8a66b89e0f
commit b3e4ac9554
12 changed files with 15 additions and 13 deletions

View File

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

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 monasca_log_api import config
from monasca_log_api.tests import base

View File

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

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 monasca_common.kafka_lib import client

View File

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

View File

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

View File

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

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 monasca_log_api.monitoring import client
from monasca_log_api.tests import base

View File

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

View File

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

View File

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

View File

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