diff options
author | Hervé Beraud <hberaud@redhat.com> | 2021-01-05 09:14:51 +0100 |
---|---|---|
committer | Michael Johnson <johnsomor@gmail.com> | 2021-04-27 21:47:11 +0000 |
commit | 14a5c0f237362f88c88f23175268b67084dfac1f (patch) | |
tree | d6ad37d362458979ce7f45d59cc3d7355a5cc2a1 | |
parent | f6c7664bad963981413c66ecd15afdb8d62341be (diff) | |
download | taskflow-14a5c0f237362f88c88f23175268b67084dfac1f.tar.gz |
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: Ib169e3deb7ddb2bc93a206ebec4043552281aa7f
-rw-r--r-- | taskflow/test.py | 2 | ||||
-rw-r--r-- | taskflow/tests/unit/worker_based/test_proxy.py | 2 | ||||
-rw-r--r-- | test-requirements.txt | 1 | ||||
-rwxr-xr-x | tools/state_graph.py | 2 |
4 files changed, 3 insertions, 4 deletions
diff --git a/taskflow/test.py b/taskflow/test.py index a9cce35..a5d880a 100644 --- a/taskflow/test.py +++ b/taskflow/test.py @@ -16,9 +16,9 @@ import collections import logging +from unittest import mock import fixtures -import mock from oslotest import base import six diff --git a/taskflow/tests/unit/worker_based/test_proxy.py b/taskflow/tests/unit/worker_based/test_proxy.py index 68688fa..c957433 100644 --- a/taskflow/tests/unit/worker_based/test_proxy.py +++ b/taskflow/tests/unit/worker_based/test_proxy.py @@ -15,10 +15,10 @@ # under the License. import socket +from unittest import mock from taskflow.engines.worker_based import proxy from taskflow import test -from taskflow.test import mock from taskflow.utils import threading_utils diff --git a/test-requirements.txt b/test-requirements.txt index def4e68..5a44051 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -26,7 +26,6 @@ psycopg2>=2.8.0 # LGPL/ZPL pydotplus>=2.0.2 # MIT License hacking<2.1,>=2.0 oslotest>=3.2.0 # Apache-2.0 -mock>=2.0.0 # BSD testtools>=2.2.0 # MIT testscenarios>=0.4 # Apache-2.0/BSD stestr>=2.0.0 # Apache-2.0 diff --git a/tools/state_graph.py b/tools/state_graph.py index 9b08638..cc70fb2 100755 --- a/tools/state_graph.py +++ b/tools/state_graph.py @@ -14,7 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. -import mock +from unittest import mock import optparse import os |