From fd21b6e096ea2ef718101c62b0e341db0199b5b7 Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Tue, 31 Mar 2020 14:16:41 -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: Icd7019c924386fb9c047fc55fb98e45fcb79f2eb Signed-off-by: Sean McGinnis --- lower-constraints.txt | 1 - oslo_rootwrap/tests/test_functional.py | 2 +- oslo_rootwrap/tests/test_rootwrap.py | 2 +- test-requirements.txt | 4 ---- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/lower-constraints.txt b/lower-constraints.txt index 3d4b864..9a397d2 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -19,7 +19,6 @@ keystoneauth1==3.4.0 linecache2==1.0.0 MarkupSafe==1.0 mccabe==0.2.1 -mock==2.0.0 mox3==0.20.0 openstackdocstheme==1.20.0 os-client-config==1.28.0 diff --git a/oslo_rootwrap/tests/test_functional.py b/oslo_rootwrap/tests/test_functional.py index 83e76d4..da59b21 100644 --- a/oslo_rootwrap/tests/test_functional.py +++ b/oslo_rootwrap/tests/test_functional.py @@ -23,6 +23,7 @@ import signal import sys import threading import time +from unittest import mock try: import eventlet @@ -30,7 +31,6 @@ except ImportError: eventlet = None import fixtures -import mock import six import testtools from testtools import content diff --git a/oslo_rootwrap/tests/test_rootwrap.py b/oslo_rootwrap/tests/test_rootwrap.py index ad923a5..112843e 100644 --- a/oslo_rootwrap/tests/test_rootwrap.py +++ b/oslo_rootwrap/tests/test_rootwrap.py @@ -16,10 +16,10 @@ import logging import logging.handlers import os import tempfile +from unittest import mock import uuid import fixtures -import mock from six import moves import testtools diff --git a/test-requirements.txt b/test-requirements.txt index 02e4738..3f5ae04 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -11,10 +11,6 @@ stestr>=2.0.0 # Apache-2.0 # this is required for the docs build jobs oslotest>=3.2.0 # Apache-2.0 - -# mocking framework -mock>=2.0.0 # BSD - # rootwrap daemon's client should be verified to run in eventlet eventlet!=0.18.3,!=0.20.1,>=0.18.2 # MIT