From c08aed239d68d925f4bcd57457f68d0631c35f40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Tue, 9 Jun 2020 00:09:14 +0200 Subject: [PATCH] Use unittest.mock instead of mock The mock third party library was needed for mock support in py2 runtimes. Since we now only support py36 and later, we can use the standard lib unittest.mock module instead. Change-Id: I0b5e9e60b00204f938d23fc4ff8e020ebb4afa43 --- openstack_election/tests/cmds/test_ci_checks.py | 2 +- openstack_election/tests/test_utils.py | 2 +- test-requirements.txt | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/openstack_election/tests/cmds/test_ci_checks.py b/openstack_election/tests/cmds/test_ci_checks.py index 58ec37ad..ade0d22c 100644 --- a/openstack_election/tests/cmds/test_ci_checks.py +++ b/openstack_election/tests/cmds/test_ci_checks.py @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. -import mock +from unittest import mock from openstack_election.cmds import ci_check_all_candidate_files from openstack_election.tests import base diff --git a/openstack_election/tests/test_utils.py b/openstack_election/tests/test_utils.py index 2f7891d2..46e50d86 100644 --- a/openstack_election/tests/test_utils.py +++ b/openstack_election/tests/test_utils.py @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. -import mock +from unittest import mock from openstack_election import exception from openstack_election.tests import base diff --git a/test-requirements.txt b/test-requirements.txt index 1214237e..13e27392 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,7 +4,6 @@ # needed for doc build hacking>=3.1.0,<3.2.0 # Apache-2.0 yamllint -mock>=2.0.0 # BSD oslotest>=1.10.0 # Apache-2.0 stestr>=2.0.0 # Apache-2.0 testresources>=2.0.0 # Apache-2.0/BSD