From 7f5336cd0dec96927252ec353160febf26196749 Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Sat, 18 Apr 2020 11:54:14 -0500 Subject: [PATCH] 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: I7bf6d007ca8c01b53152301d862f3aacf11480b2 Signed-off-by: Sean McGinnis --- masakaridashboard/hosts/tests.py | 4 ++-- masakaridashboard/notifications/tests.py | 4 ++-- masakaridashboard/segments/tests.py | 2 +- test-requirements.txt | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/masakaridashboard/hosts/tests.py b/masakaridashboard/hosts/tests.py index 9939eac..977fb4d 100644 --- a/masakaridashboard/hosts/tests.py +++ b/masakaridashboard/hosts/tests.py @@ -13,12 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. +from unittest import mock + from django.urls import reverse -import mock from masakaridashboard.test import helpers as test - INDEX_URL = reverse('horizon:masakaridashboard:hosts:index') diff --git a/masakaridashboard/notifications/tests.py b/masakaridashboard/notifications/tests.py index 252c3ec..a86de72 100644 --- a/masakaridashboard/notifications/tests.py +++ b/masakaridashboard/notifications/tests.py @@ -12,16 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. +from unittest import mock + from django.conf import settings from django.test.utils import override_settings from django.urls import reverse from django.utils.http import urlunquote -import mock from masakaridashboard.notifications import tables as notification_tab from masakaridashboard.test import helpers as test - INDEX_URL = reverse('horizon:masakaridashboard:notifications:index') diff --git a/masakaridashboard/segments/tests.py b/masakaridashboard/segments/tests.py index 12ba469..899bcf4 100644 --- a/masakaridashboard/segments/tests.py +++ b/masakaridashboard/segments/tests.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -import mock +from unittest import mock from django.conf import settings from django.test.utils import override_settings diff --git a/test-requirements.txt b/test-requirements.txt index a81a07a..2e6034e 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -11,7 +11,6 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 # Testing Requirements coverage!=4.4,>=4.0 # Apache-2.0 -mock>=2.0.0 # BSD mox3>=0.20.0 # Apache-2.0 nodeenv>=0.9.4 # BSD selenium>=2.50.1 # Apache-2.0