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: I4a5b1ec999110a50fc904f3ae93e3983efa64f88 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
parent
e6288837d4
commit
3eafa2a001
@ -13,7 +13,8 @@
|
||||
# under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_serialization import jsonutils
|
||||
import sys
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from magnumclient.osc.v1 import certificates as osc_certificates
|
||||
from magnumclient.tests.osc.unit.v1 import fakes as magnum_fakes
|
||||
|
@ -14,8 +14,8 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
import mock
|
||||
from mock import call
|
||||
from unittest import mock
|
||||
|
||||
from magnumclient.exceptions import InvalidAttribute
|
||||
from magnumclient.osc.v1 import cluster_templates as osc_ct
|
||||
|
@ -14,10 +14,10 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
import mock
|
||||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
from unittest import mock
|
||||
|
||||
from contextlib import contextmanager
|
||||
try:
|
||||
|
@ -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 magnumclient.osc.v1 import mservices
|
||||
from magnumclient.tests.osc.unit.v1 import fakes
|
||||
|
@ -14,8 +14,8 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
import mock
|
||||
from mock import call
|
||||
from unittest import mock
|
||||
|
||||
from magnumclient.osc.v1 import nodegroups as osc_nodegroups
|
||||
from magnumclient.tests.osc.unit.v1 import fakes as magnum_fakes
|
||||
|
@ -11,7 +11,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 magnumclient.osc.v1 import quotas as osc_quotas
|
||||
from magnumclient.tests.osc.unit.v1 import fakes as magnum_fakes
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from magnumclient.osc.v1 import stats as osc_stats
|
||||
from magnumclient.tests.osc.unit.v1 import fakes as magnum_fakes
|
||||
|
@ -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 magnumclient import client
|
||||
|
||||
|
@ -13,7 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_serialization import jsonutils
|
||||
import six
|
||||
import socket
|
||||
|
@ -14,11 +14,11 @@
|
||||
|
||||
import re
|
||||
import sys
|
||||
from unittest import mock
|
||||
|
||||
import argparse
|
||||
import fixtures
|
||||
from keystoneauth1 import fixture
|
||||
import mock
|
||||
import six
|
||||
from testtools import matchers
|
||||
|
||||
|
@ -16,7 +16,8 @@
|
||||
# under the License.
|
||||
|
||||
import collections
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_serialization import jsonutils
|
||||
import six
|
||||
import six.moves.builtins as __builtin__
|
||||
|
@ -13,8 +13,8 @@
|
||||
# under the License.
|
||||
|
||||
import re
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from testtools import matchers
|
||||
|
||||
from magnumclient.tests import utils
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from magnumclient.common.apiclient import exceptions
|
||||
from magnumclient.tests.v1 import shell_test_base
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from magnumclient import exceptions
|
||||
from magnumclient.tests.v1 import shell_test_base
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from magnumclient.common import cliutils
|
||||
from magnumclient.tests.v1 import shell_test_base
|
||||
|
@ -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 keystoneauth1.exceptions import catalog
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from magnumclient.common import cliutils
|
||||
from magnumclient import exceptions
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from magnumclient.common.apiclient import exceptions
|
||||
from magnumclient.tests.v1 import shell_test_base
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from magnumclient.tests.v1 import shell_test_base
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from magnumclient.tests.v1 import shell_test_base
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from magnumclient.tests.v1 import shell_test_base
|
||||
from magnumclient.v1.stats import Stats
|
||||
|
@ -11,4 +11,3 @@ osprofiler>=1.4.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
|
||||
|
Loading…
x
Reference in New Issue
Block a user