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:
parent
2aa892d4df
commit
814b7f23e2
glance_store/tests/unit
test_backend.pytest_cinder_store.pytest_connection_manager.pytest_filesystem_store.pytest_http_store.pytest_multistore_cinder.pytest_multistore_filesystem.pytest_multistore_rbd.pytest_multistore_s3.pytest_multistore_vmware.pytest_rbd_store.pytest_s3_store.pytest_store_base.pytest_swift_store.pytest_swift_store_multibackend.pytest_vmware_store.py
test-requirements.txt@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user