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:
parent
e651e5de51
commit
2b8282bb1e
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -12,9 +12,9 @@
|
||||
#
|
||||
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import fixtures
|
||||
import mock
|
||||
import sys
|
||||
import testtools
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
# under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from troveclient.tests import fakes
|
||||
from troveclient.tests.osc import utils
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
import contextlib
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import testtools
|
||||
|
||||
from troveclient.apiclient import exceptions
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -15,8 +15,8 @@
|
||||
# under the License.
|
||||
|
||||
|
||||
import mock
|
||||
import testtools
|
||||
from unittest import mock
|
||||
|
||||
from troveclient import base
|
||||
from troveclient.v1 import datastores
|
||||
|
@ -15,8 +15,8 @@
|
||||
|
||||
import imp
|
||||
import inspect
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import pkg_resources
|
||||
import testtools
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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):
|
||||
|
@ -14,9 +14,9 @@
|
||||
# under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
import os
|
||||
import testtools
|
||||
from unittest import mock
|
||||
|
||||
from troveclient.v1 import modules
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -14,8 +14,9 @@
|
||||
# under the License.
|
||||
|
||||
import base64
|
||||
from unittest import mock
|
||||
|
||||
import fixtures
|
||||
import mock
|
||||
import re
|
||||
import six
|
||||
import testtools
|
||||
|
@ -13,9 +13,9 @@
|
||||
# under the License.
|
||||
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import fixtures
|
||||
import mock
|
||||
import requests
|
||||
import testtools
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user