Use unittest mock from standard library

Drop the third party mock library to use unittest mock from
standard library.

Change-Id: Ib64b661572e4869a24865c02a6c84a6603930394
This commit is contained in:
Riccardo Pittau 2020-04-06 12:28:30 +02:00
parent 3da356de25
commit d5d62c8dbf
24 changed files with 28 additions and 26 deletions

View File

@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
from unittest import mock
from stevedore import extension
from ironic_python_agent import errors

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
from unittest import mock
from ironic_python_agent import errors
from ironic_python_agent.extensions import clean

View File

@ -13,8 +13,8 @@
# limitations under the License.
import time
from unittest import mock
import mock
from stevedore import enabled
from stevedore import extension

View File

@ -16,9 +16,9 @@
import os
import shutil
import tempfile
from unittest import mock
from ironic_lib import utils as ilib_utils
import mock
from oslo_concurrency import processutils
from ironic_python_agent import errors

View File

@ -13,8 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
from ironic_lib import disk_utils
import mock
from oslo_concurrency import processutils
from ironic_python_agent import errors

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 ironic_python_agent.extensions import log
from ironic_python_agent.tests.unit import base

View File

@ -10,7 +10,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
from unittest import mock
from oslotest import base as test_base
from ironic_python_agent.extensions import rescue

View File

@ -14,9 +14,9 @@
import os
import tempfile
from unittest import mock
from ironic_lib import exception
import mock
from oslo_concurrency import processutils
from ironic_python_agent import errors

View File

@ -13,8 +13,8 @@
# limitations under the License.
import os
from unittest import mock
import mock
from oslo_concurrency import processutils
from oslo_config import cfg

View File

@ -13,8 +13,7 @@
# limitations under the License.
import os
import mock
from unittest import mock
from ironic_python_agent import errors
from ironic_python_agent import hardware

View File

@ -14,9 +14,9 @@
import socket
import time
from unittest import mock
from ironic_lib import exception as lib_exc
import mock
from oslo_concurrency import processutils
from oslo_config import cfg
from oslo_serialization import jsonutils

View File

@ -13,8 +13,8 @@
# limitations under the License.
import time
from unittest import mock
import mock
from oslo_config import cfg
from werkzeug import test as http_test
from werkzeug import wrappers

View File

@ -12,9 +12,9 @@
# limitations under the License.
import subprocess
from unittest import mock
import ironic_lib
import mock
from oslo_concurrency import processutils
from ironic_python_agent.tests.unit import base as ironic_agent_base

View File

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

View File

@ -15,9 +15,9 @@
import binascii
import os
import time
from unittest import mock
from ironic_lib import disk_utils
import mock
import netifaces
from oslo_concurrency import processutils
from oslo_config import cfg

View File

@ -17,8 +17,8 @@ import collections
import copy
import os
import time
from unittest import mock
import mock
from oslo_concurrency import processutils
from oslo_config import cfg
import requests

View File

@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
from unittest import mock
from oslo_serialization import jsonutils
from oslo_service import loopingcall

View File

@ -13,8 +13,8 @@
# limitations under the License.
import collections
from unittest import mock
import mock
from stevedore import extension
from ironic_python_agent import errors

View File

@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
from unittest import mock
from stevedore import extension
from ironic_python_agent.extensions import clean

View File

@ -14,8 +14,8 @@
import binascii
import socket
from unittest import mock
import mock
from oslo_config import cfg
from ironic_python_agent import netutils

View File

@ -14,8 +14,7 @@
# limitations under the License.
import os
import mock
from unittest import mock
from ironic_python_agent import errors
from ironic_python_agent import numa_inspector as numa_insp

View File

@ -21,9 +21,9 @@ import shutil
import subprocess
import tarfile
import tempfile
from unittest import mock
from ironic_lib import utils as ironic_utils
import mock
from oslo_concurrency import processutils
from oslo_serialization import base64
import testtools

View File

@ -33,7 +33,6 @@ logutils==0.3.5
Mako==1.0.7
MarkupSafe==1.0
mccabe==0.2.1
mock==2.0.0
monotonic==1.4
mox3==0.25.0
msgpack==0.5.6

View File

@ -3,7 +3,6 @@
# process, which may cause wedges in the gate later.
hacking>=3.0.0,<3.1.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
mock>=2.0.0 # BSD
testtools>=2.2.0 # MIT
oslotest>=3.2.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0