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: I70a406c060ba681ddc000788b3fa5ab2bba4d41f
This commit is contained in:
Hervé Beraud 2020-06-09 12:07:16 +02:00
parent 0af3a46e16
commit db16c4640e
13 changed files with 12 additions and 13 deletions

View File

@ -15,7 +15,7 @@
import json
import uuid
import mock
from unittest import mock
from oslo_config import fixture as config_fixture
import webtest.app

View File

@ -20,7 +20,7 @@ from cryptography.hazmat.primitives.asymmetric import padding
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives import serialization
import mock
from unittest import mock
import webtest.app
from refstack.tests import api

View File

@ -15,7 +15,7 @@
import json
import uuid
import mock
from unittest import mock
from oslo_config import fixture as config_fixture
import six
import webtest.app

View File

@ -15,7 +15,7 @@
import json
import uuid
import mock
from unittest import mock
from oslo_config import fixture as config_fixture
import webtest.app

View File

@ -14,7 +14,7 @@
# under the License.
"""Refstack unittests."""
import mock
from unittest import mock
from oslotest import base

View File

@ -17,7 +17,7 @@
import json
import mock
from unittest import mock
from oslo_config import fixture as config_fixture
from six.moves.urllib import parse
import webob.exc

View File

@ -16,7 +16,7 @@
"""Tests for API's utils"""
import time
import mock
from unittest import mock
from oslo_config import fixture as config_fixture
from oslo_utils import timeutils
from oslotest import base

View File

@ -17,7 +17,7 @@
import json
import mock
from unittest import mock
from oslo_config import fixture as config_fixture
from oslotest import base
import pecan

View File

@ -18,7 +18,7 @@
import base64
import hashlib
import six
import mock
from unittest import mock
from oslo_config import fixture as config_fixture
from oslotest import base
import sqlalchemy.orm

View File

@ -16,7 +16,7 @@
import json
import httmock
import mock
from unittest import mock
from oslotest import base
import requests

View File

@ -16,7 +16,7 @@
"""Tests for refstack's migrations."""
import alembic
import mock
from unittest import mock
from oslotest import base
from refstack.db import migration

View File

@ -24,7 +24,7 @@ from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives import serialization
import jsonschema
import mock
from unittest import mock
from oslotest import base
from refstack.api import exceptions as api_exc

View File

@ -4,7 +4,6 @@ pyflakes==0.8.1
flake8==2.2.4
docutils>=0.11 # OSI-Approved Open Source, Public Domain
httmock>=1.2.4
mock
oslotest>=1.2.0 # Apache-2.0
python-subunit>=0.0.18
testrepository>=0.0.18