diff --git a/magnumclient/tests/osc/unit/osc_fakes.py b/magnumclient/tests/osc/unit/osc_fakes.py index b9e80861..89debaf5 100644 --- a/magnumclient/tests/osc/unit/osc_fakes.py +++ b/magnumclient/tests/osc/unit/osc_fakes.py @@ -13,7 +13,8 @@ # under the License. # -import mock +from unittest import mock + from oslo_serialization import jsonutils import sys diff --git a/magnumclient/tests/osc/unit/v1/test_certificates.py b/magnumclient/tests/osc/unit/v1/test_certificates.py index c5e2644e..75d0ed77 100644 --- a/magnumclient/tests/osc/unit/v1/test_certificates.py +++ b/magnumclient/tests/osc/unit/v1/test_certificates.py @@ -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 diff --git a/magnumclient/tests/osc/unit/v1/test_cluster_templates.py b/magnumclient/tests/osc/unit/v1/test_cluster_templates.py index b5c1c352..76978659 100644 --- a/magnumclient/tests/osc/unit/v1/test_cluster_templates.py +++ b/magnumclient/tests/osc/unit/v1/test_cluster_templates.py @@ -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 diff --git a/magnumclient/tests/osc/unit/v1/test_clusters.py b/magnumclient/tests/osc/unit/v1/test_clusters.py index 2530796d..784dd65a 100644 --- a/magnumclient/tests/osc/unit/v1/test_clusters.py +++ b/magnumclient/tests/osc/unit/v1/test_clusters.py @@ -14,10 +14,10 @@ # import copy -import mock import os import sys import tempfile +from unittest import mock from contextlib import contextmanager try: diff --git a/magnumclient/tests/osc/unit/v1/test_mservices.py b/magnumclient/tests/osc/unit/v1/test_mservices.py index 8039a502..7afef504 100644 --- a/magnumclient/tests/osc/unit/v1/test_mservices.py +++ b/magnumclient/tests/osc/unit/v1/test_mservices.py @@ -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 diff --git a/magnumclient/tests/osc/unit/v1/test_nodegroups.py b/magnumclient/tests/osc/unit/v1/test_nodegroups.py index 06f1b555..a9caf74e 100644 --- a/magnumclient/tests/osc/unit/v1/test_nodegroups.py +++ b/magnumclient/tests/osc/unit/v1/test_nodegroups.py @@ -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 diff --git a/magnumclient/tests/osc/unit/v1/test_quotas.py b/magnumclient/tests/osc/unit/v1/test_quotas.py index d4b4abc4..4fce333a 100644 --- a/magnumclient/tests/osc/unit/v1/test_quotas.py +++ b/magnumclient/tests/osc/unit/v1/test_quotas.py @@ -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 diff --git a/magnumclient/tests/osc/unit/v1/test_stats.py b/magnumclient/tests/osc/unit/v1/test_stats.py index 40fda177..1f6b1a7a 100644 --- a/magnumclient/tests/osc/unit/v1/test_stats.py +++ b/magnumclient/tests/osc/unit/v1/test_stats.py @@ -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 diff --git a/magnumclient/tests/test_client.py b/magnumclient/tests/test_client.py index 7748867a..26d23793 100644 --- a/magnumclient/tests/test_client.py +++ b/magnumclient/tests/test_client.py @@ -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 diff --git a/magnumclient/tests/test_httpclient.py b/magnumclient/tests/test_httpclient.py index f045c9c4..87472469 100644 --- a/magnumclient/tests/test_httpclient.py +++ b/magnumclient/tests/test_httpclient.py @@ -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 diff --git a/magnumclient/tests/test_shell.py b/magnumclient/tests/test_shell.py index 2581e98c..cdd5e3b3 100644 --- a/magnumclient/tests/test_shell.py +++ b/magnumclient/tests/test_shell.py @@ -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 diff --git a/magnumclient/tests/test_utils.py b/magnumclient/tests/test_utils.py index 831fea4f..bd560057 100644 --- a/magnumclient/tests/test_utils.py +++ b/magnumclient/tests/test_utils.py @@ -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__ diff --git a/magnumclient/tests/v1/shell_test_base.py b/magnumclient/tests/v1/shell_test_base.py index b165298b..e2d56ca6 100644 --- a/magnumclient/tests/v1/shell_test_base.py +++ b/magnumclient/tests/v1/shell_test_base.py @@ -13,8 +13,8 @@ # under the License. import re +from unittest import mock -import mock from testtools import matchers from magnumclient.tests import utils diff --git a/magnumclient/tests/v1/test_baymodels_shell.py b/magnumclient/tests/v1/test_baymodels_shell.py index 7d4a2308..5631da2e 100644 --- a/magnumclient/tests/v1/test_baymodels_shell.py +++ b/magnumclient/tests/v1/test_baymodels_shell.py @@ -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 diff --git a/magnumclient/tests/v1/test_bays_shell.py b/magnumclient/tests/v1/test_bays_shell.py index 60f512ff..6c3ab7c5 100644 --- a/magnumclient/tests/v1/test_bays_shell.py +++ b/magnumclient/tests/v1/test_bays_shell.py @@ -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 diff --git a/magnumclient/tests/v1/test_certificates_shell.py b/magnumclient/tests/v1/test_certificates_shell.py index 806130b9..61e691f7 100644 --- a/magnumclient/tests/v1/test_certificates_shell.py +++ b/magnumclient/tests/v1/test_certificates_shell.py @@ -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 diff --git a/magnumclient/tests/v1/test_client.py b/magnumclient/tests/v1/test_client.py index 6de0079c..4e0972ac 100644 --- a/magnumclient/tests/v1/test_client.py +++ b/magnumclient/tests/v1/test_client.py @@ -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 diff --git a/magnumclient/tests/v1/test_clusters_shell.py b/magnumclient/tests/v1/test_clusters_shell.py index 43d81d14..2c10282f 100644 --- a/magnumclient/tests/v1/test_clusters_shell.py +++ b/magnumclient/tests/v1/test_clusters_shell.py @@ -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 diff --git a/magnumclient/tests/v1/test_clustertemplates_shell.py b/magnumclient/tests/v1/test_clustertemplates_shell.py index ca17a4ab..e5b2a706 100644 --- a/magnumclient/tests/v1/test_clustertemplates_shell.py +++ b/magnumclient/tests/v1/test_clustertemplates_shell.py @@ -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 diff --git a/magnumclient/tests/v1/test_mservices_shell.py b/magnumclient/tests/v1/test_mservices_shell.py index d5d8999a..6b5db368 100644 --- a/magnumclient/tests/v1/test_mservices_shell.py +++ b/magnumclient/tests/v1/test_mservices_shell.py @@ -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 diff --git a/magnumclient/tests/v1/test_quotas_shell.py b/magnumclient/tests/v1/test_quotas_shell.py index 0f4f2691..da41c9f5 100644 --- a/magnumclient/tests/v1/test_quotas_shell.py +++ b/magnumclient/tests/v1/test_quotas_shell.py @@ -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 diff --git a/magnumclient/tests/v1/test_stats_shell.py b/magnumclient/tests/v1/test_stats_shell.py index 1d6ccc7f..b68164c3 100644 --- a/magnumclient/tests/v1/test_stats_shell.py +++ b/magnumclient/tests/v1/test_stats_shell.py @@ -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 diff --git a/test-requirements.txt b/test-requirements.txt index d8ef34fb..85545f58 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -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