From 8cf50a15b5e92954971766ed9ae7c03b2faf1c60 Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Sat, 18 Apr 2020 11:54:06 -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: Ie3c9acbcfd21a7ef02c48dace486e80c502f0833 Signed-off-by: Sean McGinnis --- doc/requirements.txt | 1 - magnum_ui/test/api_tests/test_rest_api.py | 2 +- magnum_ui/test/helpers.py | 2 +- test-requirements.txt | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index a34629d9..0a923db5 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -12,4 +12,3 @@ sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD sphinxcontrib-apidoc>=0.2.0 # BSD # NOTE: The following are required as horizon.test.settings loads it. -mock>=2.0.0 # BSD diff --git a/magnum_ui/test/api_tests/test_rest_api.py b/magnum_ui/test/api_tests/test_rest_api.py index e4c9a7a4..dae7c86e 100644 --- a/magnum_ui/test/api_tests/test_rest_api.py +++ b/magnum_ui/test/api_tests/test_rest_api.py @@ -12,7 +12,7 @@ # 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 diff --git a/magnum_ui/test/helpers.py b/magnum_ui/test/helpers.py index a1638ad8..fdc8b0a7 100644 --- a/magnum_ui/test/helpers.py +++ b/magnum_ui/test/helpers.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -import mock +from unittest import mock from magnum_ui import api from magnum_ui.test import test_data diff --git a/test-requirements.txt b/test-requirements.txt index d44de532..ffcbd1fe 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -9,7 +9,6 @@ # Hacking should appear first in case something else depends on pep8 hacking>=1.1.0,<1.2.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 -mock>=2.0.0 # BSD nodeenv>=0.9.4 # BSD pytest>=5.3.5 # MIT selenium>=2.50.1 # Apache-2.0