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: Ib83e626f51e6e01898bb7931c1660a1a548500f3
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-04-18 11:59:46 -05:00
parent e651e5de51
commit 2b8282bb1e
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
34 changed files with 35 additions and 34 deletions

View File

@ -10,5 +10,4 @@ requests-mock>=1.2.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
mock>=2.0.0 # BSD
httplib2>=0.9.1 # MIT

View File

@ -15,8 +15,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
import testtools
from unittest import mock
from troveclient.compat import auth
from troveclient.compat import exceptions

View File

@ -17,8 +17,8 @@ import collections
import json
import optparse
import sys
from unittest import mock
import mock
import testtools
from troveclient.compat import common

View File

@ -12,9 +12,9 @@
#
import os
from unittest import mock
import fixtures
import mock
import sys
import testtools

View File

@ -11,7 +11,7 @@
# under the License.
#
import mock
from unittest import mock
from troveclient.tests import fakes
from troveclient.tests.osc import utils

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from osc_lib import exceptions
from osc_lib import utils

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from osc_lib import exceptions
from osc_lib import utils

View File

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

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from osc_lib import exceptions
from osc_lib import utils

View File

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

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from osc_lib import exceptions
from osc_lib import utils

View File

@ -9,7 +9,7 @@
# 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
from unittest import mock
from osc_lib import exceptions
from osc_lib import utils

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from osc_lib import exceptions
from osc_lib import utils

View File

@ -15,8 +15,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
import testtools
from unittest import mock
from troveclient import base
from troveclient.v1 import accounts

View File

@ -13,9 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from mock import patch
import testtools
from unittest import mock
import uuid
from troveclient.v1 import backups

View File

@ -17,8 +17,8 @@
import contextlib
import os
from unittest import mock
import mock
import testtools
from troveclient.apiclient import exceptions

View File

@ -15,10 +15,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
import fixtures
from keystoneauth1 import adapter
import logging
import mock
import requests
import testtools

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
import testtools
from unittest import mock
from troveclient import base
from troveclient.v1 import clusters

View File

@ -15,8 +15,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
import testtools
from unittest import mock
from troveclient import common

View File

@ -15,8 +15,8 @@
# under the License.
import json
import mock
import testtools
from unittest import mock
from troveclient import base
from troveclient.v1 import configurations

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
import testtools
from unittest import mock
from troveclient.v1 import databases

View File

@ -15,8 +15,8 @@
# under the License.
import mock
import testtools
from unittest import mock
from troveclient import base
from troveclient.v1 import datastores

View File

@ -15,8 +15,8 @@
import imp
import inspect
from unittest import mock
import mock
import pkg_resources
import testtools

View File

@ -15,8 +15,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
import testtools
from unittest import mock
from troveclient import base
from troveclient.v1 import instances

View File

@ -15,8 +15,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
import testtools
from unittest import mock
from troveclient.v1 import limits

View File

@ -15,8 +15,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
import testtools
from unittest import mock
from troveclient import base
from troveclient.v1 import management

View File

@ -14,9 +14,9 @@
# under the License.
import json
import mock
import testtools
from troveclient.v1 import metadata
from unittest import mock
class TestMetadata(testtools.TestCase):

View File

@ -14,9 +14,9 @@
# under the License.
#
import mock
import os
import testtools
from unittest import mock
from troveclient.v1 import modules

View File

@ -12,8 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
import testtools
from unittest import mock
from troveclient.v1 import root

View File

@ -15,8 +15,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
import testtools
from unittest import mock
from troveclient.v1 import security_groups

View File

@ -13,10 +13,10 @@
import re
import sys
from unittest import mock
import fixtures
from keystoneauth1 import fixture
import mock
import requests_mock
import six
import testtools

View File

@ -15,8 +15,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
import testtools
from unittest import mock
from troveclient.v1 import users

View File

@ -14,8 +14,9 @@
# under the License.
import base64
from unittest import mock
import fixtures
import mock
import re
import six
import testtools

View File

@ -13,9 +13,9 @@
# under the License.
import os
from unittest import mock
import fixtures
import mock
import requests
import testtools