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: I380f25044c8f7b496d485aabf09215468f955818
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-04-18 11:55:01 -05:00 committed by Martin Chacon Piza
parent 74db147dc7
commit db7377f476
14 changed files with 16 additions and 14 deletions

View File

@ -7,7 +7,6 @@ bandit!=1.6.0,>=1.1.0 # Apache-2.0
Babel!=2.4.0,>=2.3.4 # BSD
hacking>=1.1.0,<1.2.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
mock>=2.0.0 # BSD
stestr>=1.0.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD

View File

@ -12,8 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
import fixtures
import mock
from oslo_config import cfg
from oslo_config import fixture as oo_cfg

View File

@ -18,8 +18,8 @@
import collections
import json
import mock
import time
from unittest import mock
from monasca_common.kafka import legacy_kafka_message

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 oslo_config import cfg
from oslo_utils import importutils
import yaml

View File

@ -21,8 +21,8 @@ import email.header
import smtplib
import socket
import time
from unittest import mock
import mock
import six
from monasca_notification.notification import Notification

View File

@ -12,7 +12,7 @@
# limitations under the License.
import json
import mock
from unittest import mock
import six

View File

@ -10,7 +10,8 @@
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
import mock
from unittest import mock
import six
from monasca_notification import notification as m_notification

View File

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
from unittest import mock
import pymysql

View File

@ -16,8 +16,8 @@
"""Tests NotificationProcessor"""
import mock
import time
from unittest import mock
from monasca_notification import notification as m_notification
from monasca_notification.plugins import email_notifier

View File

@ -15,8 +15,8 @@
# limitations under the License.
import contextlib
import mock
import time
from unittest import mock
from monasca_notification import notification as m_notification
from monasca_notification.plugins import email_notifier

View File

@ -10,7 +10,7 @@
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
import mock
from unittest import mock
from monasca_notification.common.repositories.orm import orm_repo
from tests import base

View File

@ -15,9 +15,9 @@
# limitations under the License.
import json
import mock
import requests
import time
from unittest import mock
import six

View File

@ -12,7 +12,7 @@
# limitations under the License.
import json
import mock
from unittest import mock
import six

View File

@ -14,8 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
import requests
from unittest import mock
import simplejson as json
import six