From 60a157a09bd078dfe598817ffa1da24d35461b71 Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Tue, 31 Mar 2020 14:15:15 -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: I792a17f4b2667713503e6bc10cfabed9905d8535 Signed-off-by: Sean McGinnis --- lower-constraints.txt | 1 - oslo_concurrency/tests/unit/test_lockutils.py | 2 +- oslo_concurrency/tests/unit/test_processutils.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lower-constraints.txt b/lower-constraints.txt index 27ecde6..986794b 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -24,7 +24,6 @@ keystoneauth1==3.4.0 linecache2==1.0.0 MarkupSafe==1.0 mccabe==0.2.1 -mock==2.0.0 monotonic==0.6 mox3==0.20.0 netaddr==0.7.18 diff --git a/oslo_concurrency/tests/unit/test_lockutils.py b/oslo_concurrency/tests/unit/test_lockutils.py index 1bd74a2..3ebdd71 100644 --- a/oslo_concurrency/tests/unit/test_lockutils.py +++ b/oslo_concurrency/tests/unit/test_lockutils.py @@ -21,8 +21,8 @@ import sys import tempfile import threading import time +from unittest import mock -import mock from oslo_config import cfg from oslotest import base as test_base import six diff --git a/oslo_concurrency/tests/unit/test_processutils.py b/oslo_concurrency/tests/unit/test_processutils.py index 982d293..2205bfa 100644 --- a/oslo_concurrency/tests/unit/test_processutils.py +++ b/oslo_concurrency/tests/unit/test_processutils.py @@ -26,9 +26,9 @@ import stat import subprocess import sys import tempfile +from unittest import mock import fixtures -import mock from oslotest import base as test_base import six