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: I67fcc16530f1c46eecb62e27eb7b88d1dee6f9df
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
This commit is contained in:
Takashi Natsume 2020-05-02 16:56:44 +09:00 committed by sean mooney
parent 94f17912c5
commit ee0b34eb3e
12 changed files with 27 additions and 16 deletions

View File

@ -27,9 +27,7 @@ kombu==4.1.0
linecache2==1.0.0
MarkupSafe==1.0
mccabe==0.2.1
mock==2.0.0
monotonic==1.4
mox3==0.20.0
msgpack-python==0.4.0
msgpack==0.5.6
netaddr==0.7.18

View File

@ -10,7 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from pyroute2 import iproute
from pyroute2.netlink import exceptions as ipexc
from pyroute2.netlink.rtnl import ifinfmsg

View File

@ -12,7 +12,7 @@
import importlib
import mock
from unittest import mock
from os_vif.internal.ip import api
from os_vif.tests.unit import base

View File

@ -10,7 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
import netifaces
from os_vif.internal.ip.windows import impl_netifaces as ip_lib

View File

@ -11,7 +11,8 @@
# under the License.
import copy
import mock
from unittest import mock
from oslo_serialization import jsonutils
from oslo_versionedobjects import base

View File

@ -10,7 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from oslo_config import cfg
from stevedore import extension

View File

@ -10,17 +10,19 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
import testtools
from unittest import mock
import fixtures
from os_vif.internal.ip.api import ip as ip_lib
import testtools
from oslo_concurrency import lockutils
from oslo_concurrency import processutils
from oslo_config import cfg
from oslo_config import fixture as config_fixture
from oslo_log.fixture import logging_error as log_fixture
from os_vif.internal.ip.api import ip as ip_lib
from vif_plug_linux_bridge import linux_net
from vif_plug_linux_bridge import privsep

View File

@ -10,7 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
import testtools
from os_vif import objects

View File

@ -10,14 +10,16 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
import random
from unittest import mock
import testscenarios
from oslo_concurrency import processutils
from oslo_config import cfg
from oslo_utils import uuidutils
from ovsdbapp.schema.open_vswitch import impl_idl
import testscenarios
from vif_plug_ovs import constants
from vif_plug_ovs import linux_net

View File

@ -10,7 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
import testtools
from oslo_concurrency import processutils

View File

@ -11,8 +11,10 @@
# under the License.
import glob
import mock
import os.path
from unittest import mock
import testtools
from os_vif.internal.ip.api import ip as ip_lib

View File

@ -10,7 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
import testtools
from os_vif.internal.ip.api import ip as ip_lib