From e1eebfa8451d4c28bef0669e4a7f493b6086cab9 Mon Sep 17 00:00:00 2001 From: Martin Kopec Date: Wed, 8 Jul 2020 09:39:50 +0000 Subject: [PATCH] Replace mock by unittest.mock in 2 forgotten cases We replaced usage of third party mock by the standard library in: https://review.opendev.org/#/c/721021/ There are 2 forgotten occurrences where we still use the third party mock, the patch fixes that. Change-Id: I7d00be25bb0b70ce55e27790df33d9134c2a52ae --- tempest/tests/cmd/test_workspace.py | 4 ++-- tempest/tests/lib/cmd/test_check_uuid.py | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tempest/tests/cmd/test_workspace.py b/tempest/tests/cmd/test_workspace.py index 7a6b57691a..eae6202248 100644 --- a/tempest/tests/cmd/test_workspace.py +++ b/tempest/tests/cmd/test_workspace.py @@ -16,12 +16,12 @@ import os import shutil import subprocess import tempfile - -from mock import patch +from unittest.mock import patch try: from StringIO import StringIO except ImportError: from io import StringIO + from tempest.cmd import workspace from tempest.lib.common.utils import data_utils from tempest.tests import base diff --git a/tempest/tests/lib/cmd/test_check_uuid.py b/tempest/tests/lib/cmd/test_check_uuid.py index 01c37c6848..130f90a927 100644 --- a/tempest/tests/lib/cmd/test_check_uuid.py +++ b/tempest/tests/lib/cmd/test_check_uuid.py @@ -10,10 +10,9 @@ # License for the specific language governing permissions and limitations # under the License. -import tempfile - import importlib -import mock +import tempfile +from unittest import mock from tempest.lib.cmd import check_uuid from tempest.tests import base