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: I446ee142c7a17446372c910f7f2a36d55df18e04
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-04-18 11:58:08 -05:00
parent 53254753c4
commit 6a045884cb
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
9 changed files with 10 additions and 9 deletions

View File

@ -12,8 +12,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import mock
import testtools
from unittest import mock
from glanceclient import exc

View File

@ -15,12 +15,12 @@
import functools
import json
import logging
from unittest import mock
import uuid
import fixtures
from keystoneauth1 import session
from keystoneauth1 import token_endpoint
import mock
from oslo_utils import encodeutils
import requests
from requests_mock.contrib import fixture

View File

@ -21,12 +21,12 @@ import logging
import os
import sys
import traceback
from unittest import mock
import uuid
import fixtures
from keystoneauth1 import exceptions as ks_exc
from keystoneauth1 import fixture as ks_fixture
import mock
from requests_mock.contrib import fixture as rm_fixture
import six

View File

@ -14,8 +14,8 @@
# under the License.
import os
from unittest import mock
import mock
import six
import ssl
import testtools

View File

@ -14,8 +14,8 @@
# under the License.
import sys
from unittest import mock
import mock
from oslo_utils import encodeutils
from requests import Response
import six

View File

@ -17,12 +17,13 @@
import argparse
import json
import os
from unittest import mock
import six
import subprocess
import tempfile
import testtools
import mock
from glanceclient import exc
from glanceclient import shell

View File

@ -15,8 +15,8 @@
import errno
import hashlib
import mock
import testtools
from unittest import mock
from glanceclient import exc
from glanceclient.tests.unit.v2 import base

View File

@ -16,8 +16,9 @@
import argparse
from copy import deepcopy
import json
import mock
import os
from unittest import mock
import six
import sys
import tempfile

View File

@ -5,7 +5,6 @@
hacking>=3.0,<3.1.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
mock>=2.0.0 # BSD
os-client-config>=1.28.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0
testtools>=2.2.0 # MIT