Using unittest.mock instead of mock

We're only support py3 now, so using the standard library
unittest.mock instead of the mock module.

Change-Id: Ie827780a950cf66030ee1a688674e66ca7f3479c
This commit is contained in:
Dongcan Ye 2020-04-02 01:56:51 +00:00
parent d86582f04d
commit 92781c975c
14 changed files with 14 additions and 14 deletions

View File

@ -47,7 +47,6 @@ logutils==0.3.5
Mako==0.4.0
MarkupSafe==1.0
mccabe==0.2.1
mock==2.0.0
monotonic==0.6
mox3==0.20.0
msgpack-python==0.4.0

View File

@ -13,8 +13,8 @@
import collections
import copy
import functools
from unittest import mock
import mock
import netaddr
from neutron.agent.common import ovs_lib
from neutron.agent.l3 import agent as neutron_l3_agent

View File

@ -13,7 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from neutron.agent.linux import ip_lib
from neutron.agent.linux import utils as linux_utils

View File

@ -14,8 +14,8 @@
# under the License.
import os
from unittest import mock
import mock
from neutron.agent.l3 import agent as neutron_l3_agent
from neutron.agent.l3 import legacy_router
from neutron.conf.agent.l3 import config as l3_config

View File

@ -17,8 +17,8 @@
import contextlib
import copy
import os
from unittest import mock
import mock
from neutron.api import extensions as api_extensions
from neutron.common import config
from neutron.db import agentschedulers_db

View File

@ -14,8 +14,8 @@
# under the License.
import socket
from unittest import mock
import mock
from neutron.db import l3_db
from neutron_lib import context as n_ctx
from neutron_lib import exceptions as nexception

View File

@ -13,8 +13,8 @@
# under the License.
import copy
from unittest import mock
import mock
from oslo_utils import uuidutils
from webob import exc

View File

@ -14,8 +14,8 @@
# under the License.
import copy
from unittest import mock
import mock
from neutron.tests.unit.api.v2 import test_base as test_api_v2
from neutron_lib.plugins import constants as nconstants
from oslo_utils import uuidutils

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from neutron.tests import base
from neutron_vpnaas.services.vpn.common import netns_wrapper as nswrap

View File

@ -17,8 +17,8 @@ import difflib
import io
import os
import socket
from unittest import mock
import mock
import netaddr
from neutron.agent.l3 import dvr_edge_router
from neutron.agent.l3 import dvr_snat_ns

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from neutron.db import servicetype_db as st_db
from neutron_lib import context as n_ctx

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import contextlib
from unittest import mock
import mock
from neutron.db import servicetype_db as st_db
from neutron.services.flavors import flavors_plugin
from neutron.tests.unit.db import test_agentschedulers_db

View File

@ -13,7 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from neutron_lib.callbacks import registry
from oslo_config import cfg
from oslo_utils import uuidutils

View File

@ -6,7 +6,6 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
flake8-import-order==0.12 # LGPLv3
mock>=2.0.0 # BSD
pylint==2.3.0 # GPLv2
requests-mock>=1.2.0 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD