From 9577fe03940662bb5e44cdffbdbe4f306df9911d Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Sat, 18 Apr 2020 11:57:28 -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: I3b728aee2f07ad547ee75cabf78659cef1233bc5 Signed-off-by: Sean McGinnis --- barbicanclient/tests/test_client.py | 3 ++- barbicanclient/tests/v1/test_containers.py | 3 ++- test-requirements.txt | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/barbicanclient/tests/test_client.py b/barbicanclient/tests/test_client.py index c4a2033d..87c72969 100644 --- a/barbicanclient/tests/test_client.py +++ b/barbicanclient/tests/test_client.py @@ -13,8 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +from unittest import mock + from keystoneauth1 import session -import mock from requests_mock.contrib import fixture import testtools diff --git a/barbicanclient/tests/v1/test_containers.py b/barbicanclient/tests/v1/test_containers.py index 82552747..67eaa266 100644 --- a/barbicanclient/tests/v1/test_containers.py +++ b/barbicanclient/tests/v1/test_containers.py @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock +from unittest import mock + from oslo_serialization import jsonutils from oslo_utils import timeutils import six diff --git a/test-requirements.txt b/test-requirements.txt index 1491aefb..1e831cf1 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,7 +5,6 @@ coverage!=4.4,>=4.1 # Apache-2.0 hacking>=1.1.0,<1.2.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD requests-mock>=1.2.0 # Apache-2.0 -mock>=2.0.0 # BSD stestr>=2.0.0 # Apache-2.0 testtools>=2.2.0 # MIT oslotest>=3.2.0 # Apache-2.0