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:
parent
8433aba4d6
commit
2163443d8a
@ -16,7 +16,6 @@ iso8601==0.1.11
|
|||||||
keystoneauth1==3.4.0
|
keystoneauth1==3.4.0
|
||||||
linecache2==1.0.0
|
linecache2==1.0.0
|
||||||
mccabe==0.2.1
|
mccabe==0.2.1
|
||||||
mock==2.0.0
|
|
||||||
netaddr==0.7.18
|
netaddr==0.7.18
|
||||||
netifaces==0.10.4
|
netifaces==0.10.4
|
||||||
os-client-config==1.28.0
|
os-client-config==1.28.0
|
||||||
|
@ -13,11 +13,11 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import threading
|
import threading
|
||||||
|
from unittest import mock
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
import eventlet
|
import eventlet
|
||||||
from eventlet import greenthread
|
from eventlet import greenthread
|
||||||
import mock
|
|
||||||
from oslotest import base as test_base
|
from oslotest import base as test_base
|
||||||
import six
|
import six
|
||||||
|
|
||||||
|
@ -13,9 +13,9 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import fixtures
|
import fixtures
|
||||||
import mock
|
|
||||||
from oslotest import base as test_base
|
from oslotest import base as test_base
|
||||||
|
|
||||||
from oslo_utils import excutils
|
from oslo_utils import excutils
|
||||||
|
@ -16,8 +16,8 @@ import fnmatch as standard_fnmatch
|
|||||||
import ntpath
|
import ntpath
|
||||||
import posixpath
|
import posixpath
|
||||||
import sys
|
import sys
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import mock
|
|
||||||
from oslotest import base
|
from oslotest import base
|
||||||
import six
|
import six
|
||||||
|
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
import contextlib
|
import contextlib
|
||||||
import socket
|
import socket
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import mock
|
|
||||||
import netifaces
|
import netifaces
|
||||||
from oslotest import base as test_base
|
from oslotest import base as test_base
|
||||||
import six
|
import six
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
import collections
|
import collections
|
||||||
import copy
|
import copy
|
||||||
import math
|
import math
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import ddt
|
import ddt
|
||||||
import mock
|
|
||||||
from oslotest import base as test_base
|
from oslotest import base as test_base
|
||||||
import six
|
import six
|
||||||
import testscenarios
|
import testscenarios
|
||||||
|
@ -17,9 +17,9 @@ import calendar
|
|||||||
import datetime
|
import datetime
|
||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import iso8601
|
import iso8601
|
||||||
import mock
|
|
||||||
from oslotest import base as test_base
|
from oslotest import base as test_base
|
||||||
from testtools import matchers
|
from testtools import matchers
|
||||||
|
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from oslo_i18n import fixture as oslo_i18n_fixture
|
from oslo_i18n import fixture as oslo_i18n_fixture
|
||||||
from oslotest import base as test_base
|
from oslotest import base as test_base
|
||||||
import six
|
import six
|
||||||
|
@ -17,9 +17,6 @@ stestr>=2.0.0 # Apache-2.0
|
|||||||
# deps = {[testenv]deps} coverage
|
# deps = {[testenv]deps} coverage
|
||||||
coverage!=4.4,>=4.0 # Apache-2.0
|
coverage!=4.4,>=4.0 # Apache-2.0
|
||||||
|
|
||||||
# mocking framework
|
|
||||||
mock>=2.0.0 # BSD
|
|
||||||
|
|
||||||
# used for oslotest cross-testing scripts
|
# used for oslotest cross-testing scripts
|
||||||
oslo.config>=5.2.0 # Apache-2.0
|
oslo.config>=5.2.0 # Apache-2.0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user