diff --git a/test-requirements.txt b/test-requirements.txt index b755b49..4c0a30d 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -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 diff --git a/tests/base.py b/tests/base.py index f39572a..944ee59 100644 --- a/tests/base.py +++ b/tests/base.py @@ -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 diff --git a/tests/test_alarm_processor.py b/tests/test_alarm_processor.py index f341495..5fd6ce5 100644 --- a/tests/test_alarm_processor.py +++ b/tests/test_alarm_processor.py @@ -18,8 +18,8 @@ import collections import json -import mock import time +from unittest import mock from monasca_common.kafka import legacy_kafka_message diff --git a/tests/test_config.py b/tests/test_config.py index 1d072b2..c9095bf 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -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 diff --git a/tests/test_email_notification.py b/tests/test_email_notification.py index 5935829..5c0a4f7 100644 --- a/tests/test_email_notification.py +++ b/tests/test_email_notification.py @@ -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 diff --git a/tests/test_hipchat_notification.py b/tests/test_hipchat_notification.py index b5ef254..19575ee 100644 --- a/tests/test_hipchat_notification.py +++ b/tests/test_hipchat_notification.py @@ -12,7 +12,7 @@ # limitations under the License. import json -import mock +from unittest import mock import six diff --git a/tests/test_jira_notification.py b/tests/test_jira_notification.py index 58d7587..3e59a00 100644 --- a/tests/test_jira_notification.py +++ b/tests/test_jira_notification.py @@ -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 diff --git a/tests/test_mysql_repo.py b/tests/test_mysql_repo.py index 4e19fc7..4c08ac0 100644 --- a/tests/test_mysql_repo.py +++ b/tests/test_mysql_repo.py @@ -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 diff --git a/tests/test_notification_processor.py b/tests/test_notification_processor.py index 875d110..a82916a 100644 --- a/tests/test_notification_processor.py +++ b/tests/test_notification_processor.py @@ -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 diff --git a/tests/test_notifiers.py b/tests/test_notifiers.py index 7367606..ad3be2a 100644 --- a/tests/test_notifiers.py +++ b/tests/test_notifiers.py @@ -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 diff --git a/tests/test_orm_repo.py b/tests/test_orm_repo.py index 383287a..c610436 100644 --- a/tests/test_orm_repo.py +++ b/tests/test_orm_repo.py @@ -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 diff --git a/tests/test_pagerduty_notification.py b/tests/test_pagerduty_notification.py index 987e3fb..38f867d 100644 --- a/tests/test_pagerduty_notification.py +++ b/tests/test_pagerduty_notification.py @@ -15,9 +15,9 @@ # limitations under the License. import json -import mock import requests import time +from unittest import mock import six diff --git a/tests/test_slack_notification.py b/tests/test_slack_notification.py index a5272ed..c677f23 100644 --- a/tests/test_slack_notification.py +++ b/tests/test_slack_notification.py @@ -12,7 +12,7 @@ # limitations under the License. import json -import mock +from unittest import mock import six diff --git a/tests/test_webhook_notification.py b/tests/test_webhook_notification.py index 466b2ce..eda8d0c 100644 --- a/tests/test_webhook_notification.py +++ b/tests/test_webhook_notification.py @@ -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