diff --git a/ironic/tests/unit/api/controllers/test_base.py b/ironic/tests/unit/api/controllers/test_base.py index 423eaffa52..b94f66f65c 100644 --- a/ironic/tests/unit/api/controllers/test_base.py +++ b/ironic/tests/unit/api/controllers/test_base.py @@ -14,8 +14,8 @@ # under the License. from http import client as http_client +from unittest import mock -import mock from webob import exc from ironic.api.controllers import base as cbase diff --git a/ironic/tests/unit/api/controllers/v1/test_allocation.py b/ironic/tests/unit/api/controllers/v1/test_allocation.py index 7f5cbd2ce9..7409ea2ae9 100644 --- a/ironic/tests/unit/api/controllers/v1/test_allocation.py +++ b/ironic/tests/unit/api/controllers/v1/test_allocation.py @@ -15,10 +15,10 @@ Tests for the API /allocations/ methods. import datetime from http import client as http_client +from unittest import mock from urllib import parse as urlparse import fixtures -import mock from oslo_config import cfg from oslo_utils import timeutils from oslo_utils import uuidutils diff --git a/ironic/tests/unit/api/controllers/v1/test_chassis.py b/ironic/tests/unit/api/controllers/v1/test_chassis.py index 13768b7b3a..69b83e4ac9 100644 --- a/ironic/tests/unit/api/controllers/v1/test_chassis.py +++ b/ironic/tests/unit/api/controllers/v1/test_chassis.py @@ -17,9 +17,9 @@ Tests for the API /chassis/ methods. import datetime from http import client as http_client +from unittest import mock from urllib import parse as urlparse -import mock from oslo_config import cfg from oslo_utils import timeutils from oslo_utils import uuidutils diff --git a/ironic/tests/unit/api/controllers/v1/test_conductor.py b/ironic/tests/unit/api/controllers/v1/test_conductor.py index c639346d49..caf85eb4c2 100644 --- a/ironic/tests/unit/api/controllers/v1/test_conductor.py +++ b/ironic/tests/unit/api/controllers/v1/test_conductor.py @@ -15,8 +15,8 @@ Tests for the API /conductors/ methods. import datetime from http import client as http_client +from unittest import mock -import mock from oslo_config import cfg from oslo_utils import timeutils from oslo_utils import uuidutils diff --git a/ironic/tests/unit/api/controllers/v1/test_deploy_template.py b/ironic/tests/unit/api/controllers/v1/test_deploy_template.py index 5f49e65d12..6f5b6e64cb 100644 --- a/ironic/tests/unit/api/controllers/v1/test_deploy_template.py +++ b/ironic/tests/unit/api/controllers/v1/test_deploy_template.py @@ -15,9 +15,9 @@ Tests for the API /deploy_templates/ methods. import datetime from http import client as http_client +from unittest import mock from urllib import parse as urlparse -import mock from oslo_config import cfg from oslo_utils import timeutils from oslo_utils import uuidutils diff --git a/ironic/tests/unit/api/controllers/v1/test_driver.py b/ironic/tests/unit/api/controllers/v1/test_driver.py index bd4bb92cc9..18100874d2 100644 --- a/ironic/tests/unit/api/controllers/v1/test_driver.py +++ b/ironic/tests/unit/api/controllers/v1/test_driver.py @@ -15,8 +15,8 @@ from http import client as http_client import json +from unittest import mock -import mock from oslo_config import cfg from testtools import matchers diff --git a/ironic/tests/unit/api/controllers/v1/test_event.py b/ironic/tests/unit/api/controllers/v1/test_event.py index 082c74493e..b67870c232 100644 --- a/ironic/tests/unit/api/controllers/v1/test_event.py +++ b/ironic/tests/unit/api/controllers/v1/test_event.py @@ -14,8 +14,7 @@ Tests for the API /events methods. """ from http import client as http_client - -import mock +from unittest import mock from ironic.api.controllers import base as api_base from ironic.api.controllers.v1 import types diff --git a/ironic/tests/unit/api/controllers/v1/test_expose.py b/ironic/tests/unit/api/controllers/v1/test_expose.py index 0cb41b22dd..9cb8e96ab8 100644 --- a/ironic/tests/unit/api/controllers/v1/test_expose.py +++ b/ironic/tests/unit/api/controllers/v1/test_expose.py @@ -19,8 +19,8 @@ import inspect import json import os import sys +from unittest import mock -import mock from oslo_utils import uuidutils import pecan.rest import pecan.testing diff --git a/ironic/tests/unit/api/controllers/v1/test_node.py b/ironic/tests/unit/api/controllers/v1/test_node.py index b042efaa98..bd036f6199 100644 --- a/ironic/tests/unit/api/controllers/v1/test_node.py +++ b/ironic/tests/unit/api/controllers/v1/test_node.py @@ -17,10 +17,10 @@ import datetime from http import client as http_client import json import os +from unittest import mock from urllib import parse as urlparse import fixtures -import mock from oslo_config import cfg from oslo_utils import timeutils from oslo_utils import uuidutils diff --git a/ironic/tests/unit/api/controllers/v1/test_notification_utils.py b/ironic/tests/unit/api/controllers/v1/test_notification_utils.py index 30c8df134b..d7e3e7e828 100644 --- a/ironic/tests/unit/api/controllers/v1/test_notification_utils.py +++ b/ironic/tests/unit/api/controllers/v1/test_notification_utils.py @@ -12,7 +12,8 @@ """Test class for ironic-api notification utilities.""" -import mock +from unittest import mock + from oslo_utils import uuidutils from ironic.api.controllers.v1 import notification_utils as notif_utils diff --git a/ironic/tests/unit/api/controllers/v1/test_port.py b/ironic/tests/unit/api/controllers/v1/test_port.py index 4c2744b70d..24df8bf265 100644 --- a/ironic/tests/unit/api/controllers/v1/test_port.py +++ b/ironic/tests/unit/api/controllers/v1/test_port.py @@ -16,9 +16,9 @@ Tests for the API /ports/ methods. import datetime from http import client as http_client import types +from unittest import mock from urllib import parse as urlparse -import mock from oslo_config import cfg from oslo_utils import timeutils from oslo_utils import uuidutils diff --git a/ironic/tests/unit/api/controllers/v1/test_portgroup.py b/ironic/tests/unit/api/controllers/v1/test_portgroup.py index 0c90cd7b21..8d66c414df 100644 --- a/ironic/tests/unit/api/controllers/v1/test_portgroup.py +++ b/ironic/tests/unit/api/controllers/v1/test_portgroup.py @@ -15,9 +15,9 @@ Tests for the API /portgroups/ methods. import datetime from http import client as http_client +from unittest import mock from urllib import parse as urlparse -import mock from oslo_config import cfg from oslo_utils import timeutils from oslo_utils import uuidutils diff --git a/ironic/tests/unit/api/controllers/v1/test_ramdisk.py b/ironic/tests/unit/api/controllers/v1/test_ramdisk.py index 2321466978..1b233fc701 100644 --- a/ironic/tests/unit/api/controllers/v1/test_ramdisk.py +++ b/ironic/tests/unit/api/controllers/v1/test_ramdisk.py @@ -16,9 +16,9 @@ Tests for the API /lookup/ methods. """ from http import client as http_client +from unittest import mock import fixtures -import mock from oslo_config import cfg from oslo_utils import uuidutils diff --git a/ironic/tests/unit/api/controllers/v1/test_root.py b/ironic/tests/unit/api/controllers/v1/test_root.py index 449c65defd..3d8408f1c2 100644 --- a/ironic/tests/unit/api/controllers/v1/test_root.py +++ b/ironic/tests/unit/api/controllers/v1/test_root.py @@ -12,7 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. -import mock +from unittest import mock + from webob import exc as webob_exc from ironic.api.controllers import v1 as v1_api diff --git a/ironic/tests/unit/api/controllers/v1/test_types.py b/ironic/tests/unit/api/controllers/v1/test_types.py index d8c369b30a..40f8ea0c4e 100644 --- a/ironic/tests/unit/api/controllers/v1/test_types.py +++ b/ironic/tests/unit/api/controllers/v1/test_types.py @@ -17,8 +17,8 @@ from http import client as http_client import platform +from unittest import mock -import mock from pecan import rest from ironic.api.controllers.v1 import types diff --git a/ironic/tests/unit/api/controllers/v1/test_utils.py b/ironic/tests/unit/api/controllers/v1/test_utils.py index e33617d747..d4c8882220 100644 --- a/ironic/tests/unit/api/controllers/v1/test_utils.py +++ b/ironic/tests/unit/api/controllers/v1/test_utils.py @@ -15,8 +15,8 @@ # under the License. from http import client as http_client +from unittest import mock -import mock import os_traits from oslo_config import cfg from oslo_utils import uuidutils diff --git a/ironic/tests/unit/api/controllers/v1/test_versions.py b/ironic/tests/unit/api/controllers/v1/test_versions.py index 3025429506..f6fc528fcd 100644 --- a/ironic/tests/unit/api/controllers/v1/test_versions.py +++ b/ironic/tests/unit/api/controllers/v1/test_versions.py @@ -16,8 +16,7 @@ Tests for the versions constants and methods. """ import re - -import mock +from unittest import mock from ironic.api.controllers.v1 import versions from ironic.common import release_mappings diff --git a/ironic/tests/unit/api/controllers/v1/test_volume_connector.py b/ironic/tests/unit/api/controllers/v1/test_volume_connector.py index 741ba78203..2c5f239447 100644 --- a/ironic/tests/unit/api/controllers/v1/test_volume_connector.py +++ b/ironic/tests/unit/api/controllers/v1/test_volume_connector.py @@ -17,9 +17,9 @@ Tests for the API /volume connectors/ methods. import datetime from http import client as http_client +from unittest import mock from urllib import parse as urlparse -import mock from oslo_config import cfg from oslo_utils import timeutils from oslo_utils import uuidutils diff --git a/ironic/tests/unit/api/controllers/v1/test_volume_target.py b/ironic/tests/unit/api/controllers/v1/test_volume_target.py index 1587461e7c..613f551a48 100644 --- a/ironic/tests/unit/api/controllers/v1/test_volume_target.py +++ b/ironic/tests/unit/api/controllers/v1/test_volume_target.py @@ -17,9 +17,9 @@ Tests for the API /volume targets/ methods. import datetime from http import client as http_client +from unittest import mock from urllib import parse as urlparse -import mock from oslo_config import cfg from oslo_utils import timeutils from oslo_utils import uuidutils diff --git a/lower-constraints.txt b/lower-constraints.txt index 24866cb842..c57bd2bcf0 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -50,7 +50,6 @@ logutils==0.3.5 Mako==1.1.2 MarkupSafe==1.1.1 mccabe==0.6.1 -mock==4.0.2 monotonic==1.5 mox3==1.0.0 msgpack-python==0.5.6