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: Idc319f3f8a3ddd57cba91e4cefc66dbb18d5cc22
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-04-18 11:53:42 -05:00
parent 2ff74894c8
commit 215217ea8b
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
12 changed files with 13 additions and 12 deletions

View File

@ -13,7 +13,6 @@ sphinxcontrib-apidoc>=0.2.0 # BSD
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
# For autodoc builds
mock>=2.0.0 # BSD
oslotest>=3.2.0 # Apache-2.0
requests-mock>=1.2.0 # Apache-2.0
testresources>=2.0.0 # Apache-2.0/BSD

View File

@ -11,10 +11,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
import uuid
import fixtures
import mock
import webob
from keystonemiddleware.tests.unit.audit import base

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from keystonemiddleware import audit
from keystonemiddleware.tests.unit.audit import base

View File

@ -10,8 +10,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
import fixtures
import mock
from keystonemiddleware.tests.unit.audit import base

View File

@ -15,6 +15,7 @@
import datetime
import os
import time
from unittest import mock
import uuid
import fixtures
@ -22,7 +23,6 @@ from keystoneauth1 import exceptions as ksa_exceptions
from keystoneauth1 import fixture
from keystoneauth1 import loading
from keystoneauth1 import session
import mock
import oslo_cache
from oslo_log import log as logging
from oslo_serialization import jsonutils

View File

@ -11,10 +11,10 @@
# under the License.
import datetime
from unittest import mock
import uuid
from keystoneauth1 import fixture
import mock
import testtools
import webob

View File

@ -10,9 +10,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
import uuid
import mock
from oslo_config import cfg
from oslotest import createfile

View File

@ -11,8 +11,8 @@
# under the License.
import time
from unittest import mock
import mock
from oslo_cache import _memcache_pool
from six.moves import queue
import testtools

View File

@ -12,7 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from oslo_serialization import jsonutils
import requests
import six

View File

@ -12,8 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
import fixtures
import mock
from oslo_serialization import jsonutils
import requests
from requests_mock.contrib import fixture as rm_fixture

View File

@ -12,11 +12,11 @@
import sys
import time
from unittest import mock
import uuid
import warnings
import fixtures
import mock
from oslo_log import log as logging
import oslotest.base as oslotest
import requests

View File

@ -8,7 +8,6 @@ flake8-docstrings==0.2.1.post1 # MIT
coverage!=4.4,>=4.0 # Apache-2.0
cryptography>=2.1 # BSD/Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
mock>=2.0.0 # BSD
oslotest>=3.2.0 # Apache-2.0
requests-mock>=1.2.0 # Apache-2.0
stevedore>=1.20.0 # Apache-2.0