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: I4c5451afece8dfff30aa1ec4c7e0d5eb277043fd
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-03-31 14:04:15 -05:00
parent 8433aba4d6
commit 2163443d8a
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
9 changed files with 8 additions and 11 deletions

View File

@ -16,7 +16,6 @@ iso8601==0.1.11
keystoneauth1==3.4.0
linecache2==1.0.0
mccabe==0.2.1
mock==2.0.0
netaddr==0.7.18
netifaces==0.10.4
os-client-config==1.28.0

View File

@ -13,11 +13,11 @@
# under the License.
import threading
from unittest import mock
import warnings
import eventlet
from eventlet import greenthread
import mock
from oslotest import base as test_base
import six

View File

@ -13,9 +13,9 @@
# under the License.
import logging
from unittest import mock
import fixtures
import mock
from oslotest import base as test_base
from oslo_utils import excutils

View File

@ -16,8 +16,8 @@ import fnmatch as standard_fnmatch
import ntpath
import posixpath
import sys
from unittest import mock
import mock
from oslotest import base
import six

View File

@ -15,8 +15,8 @@
import contextlib
import socket
from unittest import mock
import mock
import netifaces
from oslotest import base as test_base
import six

View File

@ -18,9 +18,9 @@
import collections
import copy
import math
from unittest import mock
import ddt
import mock
from oslotest import base as test_base
import six
import testscenarios

View File

@ -17,9 +17,9 @@ import calendar
import datetime
import logging
import time
from unittest import mock
import iso8601
import mock
from oslotest import base as test_base
from testtools import matchers

View File

@ -15,7 +15,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from oslo_i18n import fixture as oslo_i18n_fixture
from oslotest import base as test_base
import six

View File

@ -17,9 +17,6 @@ stestr>=2.0.0 # Apache-2.0
# deps = {[testenv]deps} coverage
coverage!=4.4,>=4.0 # Apache-2.0
# mocking framework
mock>=2.0.0 # BSD
# used for oslotest cross-testing scripts
oslo.config>=5.2.0 # Apache-2.0