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: Ib2843c62ff29b269139981f067ae6afcab624799
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-04-18 11:54:40 -05:00 committed by Martin Chacon Piza
parent a067ba118a
commit 3182d90bbf
14 changed files with 14 additions and 14 deletions

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

View File

@ -13,7 +13,7 @@
# under the License.
import hashlib
import mock
from unittest import mock
import monasca_api.db.fingerprint as fingerprint
from monasca_api.tests import base

View File

@ -14,8 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
import requests_mock
from unittest import mock
from oslo_context import context
from oslo_policy import policy as os_policy

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_api import config
from monasca_api.healthcheck import alarms_db_check as rdc

View File

@ -13,7 +13,7 @@
# under the License.
import falcon
import mock
from unittest import mock
from monasca_api import config
from monasca_api.healthcheck 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 six import PY3
from monasca_common.kafka_lib import client

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_api.healthcheck import keystone_protocol
from monasca_api.tests import base

View File

@ -16,8 +16,8 @@
import copy
import datetime
import random
from unittest import mock
import mock
from oslo_config import cfg
from oslo_log import log
import simplejson as json

View File

@ -13,8 +13,8 @@
# under the License.
import falcon
import mock
import simplejson as json
from unittest import mock
from monasca_api.tests import base
from monasca_api.v2.reference import logs

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import json
import mock
from unittest import mock
from monasca_api.common.messaging.message_formats.metrics import transform
from monasca_api.tests import base

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 monasca_common.simport import simport

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from oslotest import base

View File

@ -15,7 +15,7 @@
# under the License.
import falcon
import mock
from unittest import mock
from monasca_api.tests import base
import monasca_api.v2.common.exceptions as common_exceptions

View File

@ -11,7 +11,6 @@ cassandra-driver!=3.6.0,>=3.3.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
httplib2>=0.9.1 # MIT
influxdb>=2.9.2 # MIT
mock>=2.0.0 # BSD
oslotest>=3.2.0 # Apache-2.0
requests-mock>=1.2.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0