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: I3e92b23ab2a335b378f156c0456fb1d52706ed12
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-04-18 11:52:47 -05:00
parent 2aa892d4df
commit 814b7f23e2
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
17 changed files with 22 additions and 17 deletions

@ -15,7 +15,7 @@
"""Tests the backend store API's"""
import mock
from unittest import mock
from glance_store import backend
from glance_store import exceptions

@ -16,8 +16,9 @@
import contextlib
import errno
import hashlib
import mock
import os
from unittest import mock
import six
import socket
import tempfile

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from glance_store._drivers.swift import connection_manager
from glance_store._drivers.swift import store as swift_store

@ -18,9 +18,9 @@
import errno
import hashlib
import json
import mock
import os
import stat
from unittest import mock
import uuid
import fixtures

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
import requests

@ -16,8 +16,9 @@
import contextlib
import errno
import hashlib
import mock
import os
from unittest import mock
import six
import socket
import tempfile

@ -18,9 +18,9 @@
import errno
import hashlib
import json
import mock
import os
import stat
from unittest import mock
import uuid
import fixtures

@ -13,7 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from oslo_config import cfg
from oslo_utils import units
import six

@ -16,13 +16,13 @@
"""Tests the Multiple S3 backend store"""
import hashlib
from unittest import mock
import uuid
import boto3
import botocore
from botocore import exceptions as boto_exceptions
from botocore import stub
import mock
from oslo_config import cfg
from oslo_utils import units
import six

@ -16,9 +16,9 @@
"""Tests the Multiple VMware Datastore backend store"""
import hashlib
from unittest import mock
import uuid
import mock
from oslo_config import cfg
from oslo_utils import units
from oslo_vmware import api

@ -14,7 +14,8 @@
# under the License.
import hashlib
import mock
from unittest import mock
from oslo_utils import units
import six

@ -16,13 +16,13 @@
"""Tests the S3 backend store"""
import hashlib
from unittest import mock
import uuid
import boto3
import botocore
from botocore import exceptions as boto_exceptions
from botocore import stub
import mock
from oslo_utils import units
import six

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from oslo_config import cfg

@ -16,9 +16,10 @@
"""Tests the Swift backend store"""
import copy
from unittest import mock
import fixtures
import hashlib
import mock
import tempfile
import uuid

@ -16,9 +16,10 @@
"""Tests the Swift backend store"""
import copy
from unittest import mock
import fixtures
import hashlib
import mock
import tempfile
import uuid

@ -16,9 +16,9 @@
"""Tests the VMware Datastore backend store"""
import hashlib
from unittest import mock
import uuid
import mock
from oslo_utils import units
from oslo_vmware import api
from oslo_vmware import exceptions as vmware_exceptions

@ -8,7 +8,6 @@ hacking>=3.0,<3.1.0 # Apache-2.0
doc8>=0.6.0 # Apache-2.0
# Packaging
mock>=2.0.0 # BSD
# Unit testing
coverage!=4.4,>=4.0 # Apache-2.0