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: I4d8eada1df0ec43162d4729bf75147eb40252b72 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
parent
d16593eb10
commit
c9c34169de
@ -22,7 +22,6 @@ linecache2==1.0.0
|
||||
lxml==3.4.1
|
||||
MarkupSafe==1.0
|
||||
mccabe==0.2.1
|
||||
mock==2.0.0
|
||||
netaddr==0.7.18
|
||||
netifaces==0.10.4
|
||||
openstackdocstheme==1.20.0
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_vmware.objects import datacenter
|
||||
from oslo_vmware.tests import base
|
||||
|
@ -12,7 +12,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils import units
|
||||
import urllib.parse as urlparse
|
||||
|
||||
|
@ -14,16 +14,15 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""
|
||||
Unit tests for session management and API invocation classes.
|
||||
"""
|
||||
"""Unit tests for session management and API invocation classes."""
|
||||
|
||||
from datetime import datetime
|
||||
from unittest import mock
|
||||
|
||||
from eventlet import greenthread
|
||||
import mock
|
||||
from oslo_context import context
|
||||
import suds
|
||||
|
||||
from oslo_context import context
|
||||
from oslo_vmware import api
|
||||
from oslo_vmware import exceptions
|
||||
from oslo_vmware import pbm
|
||||
|
@ -13,13 +13,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""
|
||||
Unit tests for VMware DVS utility module.
|
||||
"""
|
||||
"""Unit tests for VMware DVS utility module."""
|
||||
|
||||
import collections
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_vmware import dvs_util
|
||||
from oslo_vmware.tests import base
|
||||
|
@ -13,10 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""
|
||||
Unit tests for exceptions module.
|
||||
"""
|
||||
import mock
|
||||
"""Unit tests for exceptions module."""
|
||||
from unittest import mock
|
||||
|
||||
from oslo_vmware._i18n import _
|
||||
from oslo_vmware import exceptions
|
||||
|
@ -13,13 +13,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""
|
||||
Unit tests for functions and classes for image transfer.
|
||||
"""
|
||||
"""Unit tests for functions and classes for image transfer."""
|
||||
|
||||
import io
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_vmware import exceptions
|
||||
from oslo_vmware import image_transfer
|
||||
|
@ -13,13 +13,11 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""
|
||||
Unit tests for PBM utility methods.
|
||||
"""
|
||||
"""Unit tests for PBM utility methods."""
|
||||
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import urllib.parse as urlparse
|
||||
import urllib.request as urllib
|
||||
|
||||
|
@ -13,13 +13,11 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""
|
||||
Unit tests for read and write handles for image transfer.
|
||||
"""
|
||||
"""Unit tests for read and write handles for image transfer."""
|
||||
|
||||
import ssl
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import requests
|
||||
|
||||
from oslo_vmware import exceptions
|
||||
|
@ -15,9 +15,9 @@
|
||||
|
||||
import http.client as httplib
|
||||
import io
|
||||
from unittest import mock
|
||||
|
||||
import ddt
|
||||
import mock
|
||||
import requests
|
||||
import suds
|
||||
|
||||
|
@ -13,13 +13,11 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""
|
||||
Unit tests for classes to invoke VMware VI SOAP calls.
|
||||
"""
|
||||
"""Unit tests for classes to invoke VMware VI SOAP calls."""
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_i18n import fixture as i18n_fixture
|
||||
import suds
|
||||
|
||||
|
@ -13,13 +13,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""
|
||||
Unit tests for VMware API utility module.
|
||||
"""
|
||||
"""Unit tests for VMware API utility module."""
|
||||
|
||||
import collections
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_vmware.tests import base
|
||||
from oslo_vmware import vim_util
|
||||
|
@ -6,7 +6,6 @@
|
||||
hacking>=3.0,<3.1.0 # Apache-2.0
|
||||
|
||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
mock>=2.0.0 # BSD
|
||||
testtools>=2.2.0 # MIT
|
||||
stestr>=2.0.0 # Apache-2.0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user