diff --git a/saharaclient/tests/unit/osc/test_plugin.py b/saharaclient/tests/unit/osc/test_plugin.py index cf5ac7d7..8d4d9f0e 100644 --- a/saharaclient/tests/unit/osc/test_plugin.py +++ b/saharaclient/tests/unit/osc/test_plugin.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock +from unittest import mock from saharaclient.osc import plugin from saharaclient.tests.unit import base diff --git a/saharaclient/tests/unit/osc/v1/fakes.py b/saharaclient/tests/unit/osc/v1/fakes.py index af374b85..a26a23e1 100644 --- a/saharaclient/tests/unit/osc/v1/fakes.py +++ b/saharaclient/tests/unit/osc/v1/fakes.py @@ -14,8 +14,8 @@ # limitations under the License. -import mock from osc_lib.tests import utils +from unittest import mock class TestDataProcessing(utils.TestCommand): diff --git a/saharaclient/tests/unit/osc/v1/test_clusters.py b/saharaclient/tests/unit/osc/v1/test_clusters.py index 7695ad11..0437c5fa 100644 --- a/saharaclient/tests/unit/osc/v1/test_clusters.py +++ b/saharaclient/tests/unit/osc/v1/test_clusters.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock from osc_lib.tests import utils as osc_utils +from unittest import mock from saharaclient.api import cluster_templates as api_ct from saharaclient.api import clusters as api_cl diff --git a/saharaclient/tests/unit/osc/v1/test_data_sources.py b/saharaclient/tests/unit/osc/v1/test_data_sources.py index c37d8ab1..e5556f8c 100644 --- a/saharaclient/tests/unit/osc/v1/test_data_sources.py +++ b/saharaclient/tests/unit/osc/v1/test_data_sources.py @@ -13,9 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock from osc_lib.tests import utils as osc_utils import testtools +from unittest import mock from saharaclient.api import data_sources as api_ds from saharaclient.osc.v1 import data_sources as osc_ds diff --git a/saharaclient/tests/unit/osc/v1/test_images.py b/saharaclient/tests/unit/osc/v1/test_images.py index 006a0b4f..1ea188b6 100644 --- a/saharaclient/tests/unit/osc/v1/test_images.py +++ b/saharaclient/tests/unit/osc/v1/test_images.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock from osc_lib.tests import utils as osc_utils +from unittest import mock from saharaclient.api import images as api_images from saharaclient.osc.v1 import images as osc_images diff --git a/saharaclient/tests/unit/osc/v1/test_job_binaries.py b/saharaclient/tests/unit/osc/v1/test_job_binaries.py index 0b4b66e0..96da3c35 100644 --- a/saharaclient/tests/unit/osc/v1/test_job_binaries.py +++ b/saharaclient/tests/unit/osc/v1/test_job_binaries.py @@ -13,9 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock from osc_lib.tests import utils as osc_u import testtools +from unittest import mock from saharaclient.api import job_binaries as api_jb from saharaclient.osc.v1 import job_binaries as osc_jb diff --git a/saharaclient/tests/unit/osc/v1/test_job_templates.py b/saharaclient/tests/unit/osc/v1/test_job_templates.py index 9b6b711d..1da45972 100644 --- a/saharaclient/tests/unit/osc/v1/test_job_templates.py +++ b/saharaclient/tests/unit/osc/v1/test_job_templates.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock from osc_lib.tests import utils as osc_utils +from unittest import mock from saharaclient.api import jobs as api_j from saharaclient.osc.v1 import job_templates as osc_j diff --git a/saharaclient/tests/unit/osc/v1/test_job_types.py b/saharaclient/tests/unit/osc/v1/test_job_types.py index ccc7be3e..8d1a319b 100644 --- a/saharaclient/tests/unit/osc/v1/test_job_types.py +++ b/saharaclient/tests/unit/osc/v1/test_job_types.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock +from unittest import mock from saharaclient.api import job_types as api_jt from saharaclient.api import jobs as api_j diff --git a/saharaclient/tests/unit/osc/v1/test_jobs.py b/saharaclient/tests/unit/osc/v1/test_jobs.py index fc325f25..1aeac508 100644 --- a/saharaclient/tests/unit/osc/v1/test_jobs.py +++ b/saharaclient/tests/unit/osc/v1/test_jobs.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock from osc_lib.tests import utils as osc_utils +from unittest import mock from saharaclient.api import job_executions as api_je from saharaclient.osc.v1 import jobs as osc_je diff --git a/saharaclient/tests/unit/osc/v1/test_node_group_templates.py b/saharaclient/tests/unit/osc/v1/test_node_group_templates.py index 10dc5aab..e9efb201 100644 --- a/saharaclient/tests/unit/osc/v1/test_node_group_templates.py +++ b/saharaclient/tests/unit/osc/v1/test_node_group_templates.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock from osc_lib.tests import utils as osc_utils +from unittest import mock from saharaclient.api import node_group_templates as api_ngt from saharaclient.osc.v1 import node_group_templates as osc_ngt diff --git a/saharaclient/tests/unit/osc/v1/test_plugins.py b/saharaclient/tests/unit/osc/v1/test_plugins.py index fad361da..75c49b14 100644 --- a/saharaclient/tests/unit/osc/v1/test_plugins.py +++ b/saharaclient/tests/unit/osc/v1/test_plugins.py @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock +from unittest import mock + from oslo_serialization import jsonutils as json from saharaclient.api import plugins as api_plugins diff --git a/saharaclient/tests/unit/osc/v1/test_utils.py b/saharaclient/tests/unit/osc/v1/test_utils.py index 59ddbdc8..4f70cf56 100644 --- a/saharaclient/tests/unit/osc/v1/test_utils.py +++ b/saharaclient/tests/unit/osc/v1/test_utils.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock +from unittest import mock from saharaclient.osc import utils from saharaclient.tests.unit import base diff --git a/saharaclient/tests/unit/osc/v2/test_clusters.py b/saharaclient/tests/unit/osc/v2/test_clusters.py index 6bbb7253..99c07b6e 100644 --- a/saharaclient/tests/unit/osc/v2/test_clusters.py +++ b/saharaclient/tests/unit/osc/v2/test_clusters.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock from osc_lib.tests import utils as osc_utils +from unittest import mock from saharaclient.api import cluster_templates as api_ct from saharaclient.api import clusters as api_cl diff --git a/saharaclient/tests/unit/osc/v2/test_data_sources.py b/saharaclient/tests/unit/osc/v2/test_data_sources.py index 27af0b59..1c2c3892 100644 --- a/saharaclient/tests/unit/osc/v2/test_data_sources.py +++ b/saharaclient/tests/unit/osc/v2/test_data_sources.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock from osc_lib.tests import utils as osc_utils +from unittest import mock from saharaclient.api import data_sources as api_ds from saharaclient.osc.v1 import data_sources as osc_ds diff --git a/saharaclient/tests/unit/osc/v2/test_images.py b/saharaclient/tests/unit/osc/v2/test_images.py index 4e940011..1855bdf6 100644 --- a/saharaclient/tests/unit/osc/v2/test_images.py +++ b/saharaclient/tests/unit/osc/v2/test_images.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock from osc_lib.tests import utils as osc_utils +from unittest import mock from saharaclient.api import images as api_images from saharaclient.osc.v1 import images as osc_images diff --git a/saharaclient/tests/unit/osc/v2/test_job_binaries.py b/saharaclient/tests/unit/osc/v2/test_job_binaries.py index ee94e83d..93d889a5 100644 --- a/saharaclient/tests/unit/osc/v2/test_job_binaries.py +++ b/saharaclient/tests/unit/osc/v2/test_job_binaries.py @@ -13,9 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock from osc_lib.tests import utils as osc_u import testtools +from unittest import mock from saharaclient.api import job_binaries as api_jb from saharaclient.osc.v1 import job_binaries as osc_jb diff --git a/saharaclient/tests/unit/osc/v2/test_job_templates.py b/saharaclient/tests/unit/osc/v2/test_job_templates.py index 4060fb38..08d6c262 100644 --- a/saharaclient/tests/unit/osc/v2/test_job_templates.py +++ b/saharaclient/tests/unit/osc/v2/test_job_templates.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock from osc_lib.tests import utils as osc_utils +from unittest import mock from saharaclient.api.v2 import job_templates as api_j from saharaclient.osc.v2 import job_templates as osc_j diff --git a/saharaclient/tests/unit/osc/v2/test_job_types.py b/saharaclient/tests/unit/osc/v2/test_job_types.py index 130f2181..477f1470 100644 --- a/saharaclient/tests/unit/osc/v2/test_job_types.py +++ b/saharaclient/tests/unit/osc/v2/test_job_types.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock +from unittest import mock from saharaclient.api import job_types as api_jt from saharaclient.api.v2 import job_templates as api_job_templates diff --git a/saharaclient/tests/unit/osc/v2/test_jobs.py b/saharaclient/tests/unit/osc/v2/test_jobs.py index 5eb0e3bc..5c880db4 100644 --- a/saharaclient/tests/unit/osc/v2/test_jobs.py +++ b/saharaclient/tests/unit/osc/v2/test_jobs.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock from osc_lib.tests import utils as osc_utils +from unittest import mock from saharaclient.api.v2 import jobs as api_j from saharaclient.osc.v2 import jobs as osc_j diff --git a/saharaclient/tests/unit/osc/v2/test_node_group_templates.py b/saharaclient/tests/unit/osc/v2/test_node_group_templates.py index 3eef3b01..5555262d 100644 --- a/saharaclient/tests/unit/osc/v2/test_node_group_templates.py +++ b/saharaclient/tests/unit/osc/v2/test_node_group_templates.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock from osc_lib.tests import utils as osc_utils +from unittest import mock from saharaclient.api import node_group_templates as api_ngt from saharaclient.osc.v2 import node_group_templates as osc_ngt diff --git a/saharaclient/tests/unit/osc/v2/test_plugins.py b/saharaclient/tests/unit/osc/v2/test_plugins.py index 6fcf972e..ae72e833 100644 --- a/saharaclient/tests/unit/osc/v2/test_plugins.py +++ b/saharaclient/tests/unit/osc/v2/test_plugins.py @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock +from unittest import mock + from oslo_serialization import jsonutils as json from saharaclient.api import plugins as api_plugins diff --git a/saharaclient/tests/unit/test_data_sources.py b/saharaclient/tests/unit/test_data_sources.py index 594d6541..7da69fb3 100644 --- a/saharaclient/tests/unit/test_data_sources.py +++ b/saharaclient/tests/unit/test_data_sources.py @@ -14,8 +14,8 @@ from saharaclient.api import data_sources as ds from saharaclient.tests.unit import base +from unittest import mock -import mock from oslo_serialization import jsonutils as json diff --git a/saharaclient/tests/unit/test_manager.py b/saharaclient/tests/unit/test_manager.py index 176154fb..3d91b088 100644 --- a/saharaclient/tests/unit/test_manager.py +++ b/saharaclient/tests/unit/test_manager.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock +from unittest import mock from saharaclient.api import base from saharaclient.tests.unit import base as test_base diff --git a/test-requirements.txt b/test-requirements.txt index 6927cd7e..d0aa9bf1 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -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 oslotest>=3.2.0 # Apache-2.0 stestr>=1.0.0 # Apache-2.0 requests-mock>=1.2.0 # Apache-2.0