diff --git a/kuryr_libnetwork/tests/unit/base.py b/kuryr_libnetwork/tests/unit/base.py index fcd6332b..fdd68df0 100644 --- a/kuryr_libnetwork/tests/unit/base.py +++ b/kuryr_libnetwork/tests/unit/base.py @@ -10,8 +10,8 @@ # License for the specific language governing permissions and limitations # under the License. -import mock import netaddr +from unittest import mock from neutronclient.v2_0 import client from oslotest import base diff --git a/kuryr_libnetwork/tests/unit/port_driver/drivers/test_nested.py b/kuryr_libnetwork/tests/unit/port_driver/drivers/test_nested.py index 6e340cc5..d1c15c92 100644 --- a/kuryr_libnetwork/tests/unit/port_driver/drivers/test_nested.py +++ b/kuryr_libnetwork/tests/unit/port_driver/drivers/test_nested.py @@ -10,7 +10,8 @@ # License for the specific language governing permissions and limitations # under the License. -import mock +from unittest import mock + from oslo_utils import uuidutils from kuryr.lib import binding diff --git a/kuryr_libnetwork/tests/unit/port_driver/drivers/test_sriov.py b/kuryr_libnetwork/tests/unit/port_driver/drivers/test_sriov.py index 766db323..72018817 100644 --- a/kuryr_libnetwork/tests/unit/port_driver/drivers/test_sriov.py +++ b/kuryr_libnetwork/tests/unit/port_driver/drivers/test_sriov.py @@ -11,8 +11,8 @@ # under the License. import glob -import mock import os +from unittest import mock from oslo_utils import uuidutils diff --git a/kuryr_libnetwork/tests/unit/port_driver/drivers/test_veth.py b/kuryr_libnetwork/tests/unit/port_driver/drivers/test_veth.py index cd7973c3..b9d02ba9 100644 --- a/kuryr_libnetwork/tests/unit/port_driver/drivers/test_veth.py +++ b/kuryr_libnetwork/tests/unit/port_driver/drivers/test_veth.py @@ -10,7 +10,8 @@ # License for the specific language governing permissions and limitations # under the License. -import mock +from unittest import mock + from oslo_utils import uuidutils from kuryr.lib import binding diff --git a/kuryr_libnetwork/tests/unit/port_driver/drivers/test_vlan.py b/kuryr_libnetwork/tests/unit/port_driver/drivers/test_vlan.py index ac4b9a30..19c47761 100644 --- a/kuryr_libnetwork/tests/unit/port_driver/drivers/test_vlan.py +++ b/kuryr_libnetwork/tests/unit/port_driver/drivers/test_vlan.py @@ -10,7 +10,8 @@ # License for the specific language governing permissions and limitations # under the License. -import mock +from unittest import mock + from oslo_utils import uuidutils from kuryr.lib import binding diff --git a/kuryr_libnetwork/tests/unit/port_driver/test_base.py b/kuryr_libnetwork/tests/unit/port_driver/test_base.py index 07c0cfec..7f3c01b5 100644 --- a/kuryr_libnetwork/tests/unit/port_driver/test_base.py +++ b/kuryr_libnetwork/tests/unit/port_driver/test_base.py @@ -10,8 +10,9 @@ # License for the specific language governing permissions and limitations # under the License. +from unittest import mock + import ddt -import mock from kuryr.lib import exceptions from kuryr_libnetwork.port_driver import base as d_base diff --git a/kuryr_libnetwork/tests/unit/port_driver/test_driver.py b/kuryr_libnetwork/tests/unit/port_driver/test_driver.py index 79905ead..24eecee8 100644 --- a/kuryr_libnetwork/tests/unit/port_driver/test_driver.py +++ b/kuryr_libnetwork/tests/unit/port_driver/test_driver.py @@ -10,8 +10,9 @@ # License for the specific language governing permissions and limitations # under the License. +from unittest import mock + import ddt -import mock from oslo_utils import importutils diff --git a/kuryr_libnetwork/tests/unit/test_config.py b/kuryr_libnetwork/tests/unit/test_config.py index ba4d4e42..75602a4d 100644 --- a/kuryr_libnetwork/tests/unit/test_config.py +++ b/kuryr_libnetwork/tests/unit/test_config.py @@ -10,8 +10,9 @@ # License for the specific language governing permissions and limitations # under the License. +from unittest import mock + import ddt -import mock import os from six.moves.urllib import parse import sys diff --git a/kuryr_libnetwork/tests/unit/test_external_connectivity.py b/kuryr_libnetwork/tests/unit/test_external_connectivity.py index f9059251..90de84f0 100644 --- a/kuryr_libnetwork/tests/unit/test_external_connectivity.py +++ b/kuryr_libnetwork/tests/unit/test_external_connectivity.py @@ -12,8 +12,8 @@ from collections import defaultdict from itertools import groupby -import mock from operator import itemgetter +from unittest import mock import ddt from oslo_serialization import jsonutils diff --git a/kuryr_libnetwork/tests/unit/test_ipam_pool.py b/kuryr_libnetwork/tests/unit/test_ipam_pool.py index dc90776c..b3fc5665 100644 --- a/kuryr_libnetwork/tests/unit/test_ipam_pool.py +++ b/kuryr_libnetwork/tests/unit/test_ipam_pool.py @@ -10,8 +10,9 @@ # License for the specific language governing permissions and limitations # under the License. +from unittest import mock + import ddt -import mock from neutronclient.common import exceptions from oslo_serialization import jsonutils diff --git a/kuryr_libnetwork/tests/unit/test_kuryr.py b/kuryr_libnetwork/tests/unit/test_kuryr.py index b9c03aff..ac338cd0 100644 --- a/kuryr_libnetwork/tests/unit/test_kuryr.py +++ b/kuryr_libnetwork/tests/unit/test_kuryr.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 import ddt from oslo_serialization import jsonutils diff --git a/kuryr_libnetwork/tests/unit/test_kuryr_endpoint.py b/kuryr_libnetwork/tests/unit/test_kuryr_endpoint.py index d2ceb9f1..af519058 100644 --- a/kuryr_libnetwork/tests/unit/test_kuryr_endpoint.py +++ b/kuryr_libnetwork/tests/unit/test_kuryr_endpoint.py @@ -10,8 +10,9 @@ # License for the specific language governing permissions and limitations # under the License. +from unittest import mock + import ddt -import mock from neutronclient.common import exceptions as n_exceptions from oslo_concurrency import processutils from oslo_serialization import jsonutils diff --git a/kuryr_libnetwork/tests/unit/test_kuryr_existing_network.py b/kuryr_libnetwork/tests/unit/test_kuryr_existing_network.py index dd916f9a..bf6a0349 100644 --- a/kuryr_libnetwork/tests/unit/test_kuryr_existing_network.py +++ b/kuryr_libnetwork/tests/unit/test_kuryr_existing_network.py @@ -10,8 +10,9 @@ # License for the specific language governing permissions and limitations # under the License. +from unittest import mock + import ddt -import mock from neutronclient.common import exceptions as n_exceptions from oslo_serialization import jsonutils from oslo_utils import uuidutils diff --git a/kuryr_libnetwork/tests/unit/test_kuryr_ipam.py b/kuryr_libnetwork/tests/unit/test_kuryr_ipam.py index da600931..82316021 100644 --- a/kuryr_libnetwork/tests/unit/test_kuryr_ipam.py +++ b/kuryr_libnetwork/tests/unit/test_kuryr_ipam.py @@ -11,10 +11,11 @@ # under the License. import ipaddress +from unittest import mock + import six import ddt -import mock from oslo_serialization import jsonutils from oslo_utils import uuidutils from werkzeug import exceptions as w_exceptions diff --git a/kuryr_libnetwork/tests/unit/test_kuryr_network.py b/kuryr_libnetwork/tests/unit/test_kuryr_network.py index 2b81a427..3187b5f6 100644 --- a/kuryr_libnetwork/tests/unit/test_kuryr_network.py +++ b/kuryr_libnetwork/tests/unit/test_kuryr_network.py @@ -10,9 +10,10 @@ # License for the specific language governing permissions and limitations # under the License. +from unittest import mock + from ddt import data from ddt import ddt -import mock from neutronclient.common import exceptions from oslo_serialization import jsonutils from oslo_utils import uuidutils