Use unittest mock from standard library

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

Change-Id: Ib64b661572e4869a24865c02a6c84a6603930394
changes/09/717709/2
Riccardo Pittau 3 years ago
parent 3da356de25
commit d5d62c8dbf
  1. 3
      ironic_python_agent/tests/unit/extensions/test_base.py
  2. 2
      ironic_python_agent/tests/unit/extensions/test_clean.py
  3. 2
      ironic_python_agent/tests/unit/extensions/test_flow.py
  4. 2
      ironic_python_agent/tests/unit/extensions/test_image.py
  5. 3
      ironic_python_agent/tests/unit/extensions/test_iscsi.py
  6. 2
      ironic_python_agent/tests/unit/extensions/test_log.py
  7. 3
      ironic_python_agent/tests/unit/extensions/test_rescue.py
  8. 2
      ironic_python_agent/tests/unit/extensions/test_standby.py
  9. 2
      ironic_python_agent/tests/unit/hardware_managers/test_cna.py
  10. 3
      ironic_python_agent/tests/unit/hardware_managers/test_mlnx.py
  11. 2
      ironic_python_agent/tests/unit/test_agent.py
  12. 2
      ironic_python_agent/tests/unit/test_api.py
  13. 2
      ironic_python_agent/tests/unit/test_base.py
  14. 3
      ironic_python_agent/tests/unit/test_dmi_inspector.py
  15. 2
      ironic_python_agent/tests/unit/test_hardware.py
  16. 2
      ironic_python_agent/tests/unit/test_inspector.py
  17. 3
      ironic_python_agent/tests/unit/test_ironic_api_client.py
  18. 2
      ironic_python_agent/tests/unit/test_multi_hardware.py
  19. 3
      ironic_python_agent/tests/unit/test_multi_hardware_clean_steps.py
  20. 2
      ironic_python_agent/tests/unit/test_netutils.py
  21. 3
      ironic_python_agent/tests/unit/test_numa_inspector.py
  22. 2
      ironic_python_agent/tests/unit/test_utils.py
  23. 1
      lower-constraints.txt
  24. 1
      test-requirements.txt

@ -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

@ -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

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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

Loading…
Cancel
Save