From 78569fec5bc08db47323a2c6c204fd921bcb0626 Mon Sep 17 00:00:00 2001 From: Witek Bedyk Date: Fri, 3 Apr 2020 16:01:24 +0200 Subject: [PATCH] Fix mock import statements As we dropped Python 2 support we don't have to use the third party mock library with Python 2 compatibility and can move to Python 3 standard library. The change updates the import statements to reflect that. Change-Id: I39d9410ae43a2d9e6f6d6eaf74d06a82f2c33524 --- lower-constraints.txt | 1 - monascaclient/tests/test_client.py | 2 +- monascaclient/tests/test_shell.py | 2 +- monascaclient/tests/v2_0/shell/test_alarm_definitions.py | 2 +- monascaclient/tests/v2_0/shell/test_metrics.py | 2 +- monascaclient/tests/v2_0/shell/test_notification_types.py | 2 +- monascaclient/tests/v2_0/shell/test_notifications.py | 2 +- 7 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lower-constraints.txt b/lower-constraints.txt index 897fce1..f708475 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -30,7 +30,6 @@ keystoneauth1==3.4.0 linecache2==1.0.0 MarkupSafe==1.0 mccabe==0.2.1 -mock==2.0.0 monotonic==0.6 mox3==0.20.0 msgpack-python==0.4.0 diff --git a/monascaclient/tests/test_client.py b/monascaclient/tests/test_client.py index ebc1021..3d709ed 100644 --- a/monascaclient/tests/test_client.py +++ b/monascaclient/tests/test_client.py @@ -14,9 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +from unittest import mock import warnings -import mock from oslotest import base from monascaclient import client diff --git a/monascaclient/tests/test_shell.py b/monascaclient/tests/test_shell.py index bed27f1..5461670 100644 --- a/monascaclient/tests/test_shell.py +++ b/monascaclient/tests/test_shell.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 from oslotest import base diff --git a/monascaclient/tests/v2_0/shell/test_alarm_definitions.py b/monascaclient/tests/v2_0/shell/test_alarm_definitions.py index a844b11..61c8f7d 100644 --- a/monascaclient/tests/v2_0/shell/test_alarm_definitions.py +++ b/monascaclient/tests/v2_0/shell/test_alarm_definitions.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -import mock +from unittest import mock from oslotest import base diff --git a/monascaclient/tests/v2_0/shell/test_metrics.py b/monascaclient/tests/v2_0/shell/test_metrics.py index fd46530..fde6663 100644 --- a/monascaclient/tests/v2_0/shell/test_metrics.py +++ b/monascaclient/tests/v2_0/shell/test_metrics.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -import mock +from unittest import mock from oslotest import base diff --git a/monascaclient/tests/v2_0/shell/test_notification_types.py b/monascaclient/tests/v2_0/shell/test_notification_types.py index 80919dc..74291b5 100644 --- a/monascaclient/tests/v2_0/shell/test_notification_types.py +++ b/monascaclient/tests/v2_0/shell/test_notification_types.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -import mock +from unittest import mock from oslotest import base diff --git a/monascaclient/tests/v2_0/shell/test_notifications.py b/monascaclient/tests/v2_0/shell/test_notifications.py index 1c7015c..878e877 100644 --- a/monascaclient/tests/v2_0/shell/test_notifications.py +++ b/monascaclient/tests/v2_0/shell/test_notifications.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -import mock +from unittest import mock from oslotest import base