From dcd7fad34c3b7f5410a47b077249b1d0d0323a35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Tue, 9 Jun 2020 12:07:33 +0200 Subject: [PATCH] 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: If7d749018d7a69906f7f4763b147f09cfadd6692 --- refstack_client/tests/unit/test_client.py | 4 ++-- refstack_client/tests/unit/test_list_parser.py | 2 +- test-requirements.txt | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/refstack_client/tests/unit/test_client.py b/refstack_client/tests/unit/test_client.py index 7ab4510..c38384e 100755 --- a/refstack_client/tests/unit/test_client.py +++ b/refstack_client/tests/unit/test_client.py @@ -21,8 +21,8 @@ import os import tempfile import httmock -import mock -from mock import MagicMock +from unittest import mock +from unittest.mock import MagicMock import unittest from refstack_client import refstack_client as rc diff --git a/refstack_client/tests/unit/test_list_parser.py b/refstack_client/tests/unit/test_list_parser.py index 7e20962..6d2ba8d 100644 --- a/refstack_client/tests/unit/test_list_parser.py +++ b/refstack_client/tests/unit/test_list_parser.py @@ -20,7 +20,7 @@ import subprocess import tempfile import httmock -import mock +from unittest import mock import unittest import refstack_client.list_parser as parser diff --git a/test-requirements.txt b/test-requirements.txt index 39b4325..875d094 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,6 +4,5 @@ flake8<3.8.0 docutils>=0.11 # OSI-Approved Open Source, Public Domain stestr>=1.1.0 # Apache-2.0 testtools>=0.9.34 -mock coverage httmock