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:
parent
94f17912c5
commit
ee0b34eb3e
@ -27,9 +27,7 @@ kombu==4.1.0
|
|||||||
linecache2==1.0.0
|
linecache2==1.0.0
|
||||||
MarkupSafe==1.0
|
MarkupSafe==1.0
|
||||||
mccabe==0.2.1
|
mccabe==0.2.1
|
||||||
mock==2.0.0
|
|
||||||
monotonic==1.4
|
monotonic==1.4
|
||||||
mox3==0.20.0
|
|
||||||
msgpack-python==0.4.0
|
msgpack-python==0.4.0
|
||||||
msgpack==0.5.6
|
msgpack==0.5.6
|
||||||
netaddr==0.7.18
|
netaddr==0.7.18
|
||||||
|
@ -10,7 +10,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from pyroute2 import iproute
|
from pyroute2 import iproute
|
||||||
from pyroute2.netlink import exceptions as ipexc
|
from pyroute2.netlink import exceptions as ipexc
|
||||||
from pyroute2.netlink.rtnl import ifinfmsg
|
from pyroute2.netlink.rtnl import ifinfmsg
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
import importlib
|
import importlib
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from os_vif.internal.ip import api
|
from os_vif.internal.ip import api
|
||||||
from os_vif.tests.unit import base
|
from os_vif.tests.unit import base
|
||||||
|
@ -10,7 +10,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
import netifaces
|
import netifaces
|
||||||
|
|
||||||
from os_vif.internal.ip.windows import impl_netifaces as ip_lib
|
from os_vif.internal.ip.windows import impl_netifaces as ip_lib
|
||||||
|
@ -11,7 +11,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
import mock
|
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
from oslo_versionedobjects import base
|
from oslo_versionedobjects import base
|
||||||
|
@ -10,7 +10,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from stevedore import extension
|
from stevedore import extension
|
||||||
|
|
||||||
|
@ -10,17 +10,19 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
import testtools
|
|
||||||
|
|
||||||
import fixtures
|
import fixtures
|
||||||
from os_vif.internal.ip.api import ip as ip_lib
|
import testtools
|
||||||
|
|
||||||
from oslo_concurrency import lockutils
|
from oslo_concurrency import lockutils
|
||||||
from oslo_concurrency import processutils
|
from oslo_concurrency import processutils
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_config import fixture as config_fixture
|
from oslo_config import fixture as config_fixture
|
||||||
from oslo_log.fixture import logging_error as log_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 linux_net
|
||||||
from vif_plug_linux_bridge import privsep
|
from vif_plug_linux_bridge import privsep
|
||||||
|
|
||||||
|
@ -10,7 +10,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from os_vif import objects
|
from os_vif import objects
|
||||||
|
@ -10,14 +10,16 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
import testscenarios
|
||||||
|
|
||||||
from oslo_concurrency import processutils
|
from oslo_concurrency import processutils
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
from ovsdbapp.schema.open_vswitch import impl_idl
|
from ovsdbapp.schema.open_vswitch import impl_idl
|
||||||
import testscenarios
|
|
||||||
|
|
||||||
from vif_plug_ovs import constants
|
from vif_plug_ovs import constants
|
||||||
from vif_plug_ovs import linux_net
|
from vif_plug_ovs import linux_net
|
||||||
|
@ -10,7 +10,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from oslo_concurrency import processutils
|
from oslo_concurrency import processutils
|
||||||
|
@ -11,8 +11,10 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import glob
|
import glob
|
||||||
import mock
|
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from os_vif.internal.ip.api import ip as ip_lib
|
from os_vif.internal.ip.api import ip as ip_lib
|
||||||
|
@ -10,7 +10,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from os_vif.internal.ip.api import ip as ip_lib
|
from os_vif.internal.ip.api import ip as ip_lib
|
||||||
|
Loading…
x
Reference in New Issue
Block a user