]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
ceph-volume: migrate unit tests from 'mock' to 'unittest.mock'
authorGuillaume Abrioux <gabrioux@ibm.com>
Mon, 17 Feb 2025 12:43:14 +0000 (12:43 +0000)
committerGuillaume Abrioux <gabrioux@ibm.com>
Thu, 20 Feb 2025 12:14:48 +0000 (12:14 +0000)
commit55c3ac55dcedaf185c96ad37d799d6f65ff203df
tree2fa55519a250d3c700b40439522f781c8d54c8c0
parent140199b098bcc203b480330dbd8547230a7954c2
ceph-volume: migrate unit tests from 'mock' to 'unittest.mock'

unit tests in ceph-volume was still using the external 'mock' library
for unit tests, which is unnecessary since 'unittest.mock' is part
of the Python standard library (available since Python 3.3).
This commit updates all imports to use 'unittest.mock' instead,
ensuring better maintainability and removing the need for an extra
dependency.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
25 files changed:
src/ceph-volume/ceph_volume/tests/api/test_lvm.py
src/ceph-volume/ceph_volume/tests/conftest.py
src/ceph-volume/ceph_volume/tests/devices/lvm/test_activate.py
src/ceph-volume/ceph_volume/tests/devices/lvm/test_batch.py
src/ceph-volume/ceph_volume/tests/devices/lvm/test_deactivate.py
src/ceph-volume/ceph_volume/tests/devices/lvm/test_listing.py
src/ceph-volume/ceph_volume/tests/devices/lvm/test_migrate.py
src/ceph-volume/ceph_volume/tests/devices/lvm/test_prepare.py
src/ceph-volume/ceph_volume/tests/devices/lvm/test_zap.py
src/ceph-volume/ceph_volume/tests/devices/raw/test_list.py
src/ceph-volume/ceph_volume/tests/devices/raw/test_prepare.py
src/ceph-volume/ceph_volume/tests/devices/simple/test_activate.py
src/ceph-volume/ceph_volume/tests/devices/test_zap.py
src/ceph-volume/ceph_volume/tests/objectstore/test_baseobjectstore.py
src/ceph-volume/ceph_volume/tests/objectstore/test_bluestore.py
src/ceph-volume/ceph_volume/tests/objectstore/test_lvmbluestore.py
src/ceph-volume/ceph_volume/tests/objectstore/test_rawbluestore.py
src/ceph-volume/ceph_volume/tests/test_inventory.py
src/ceph-volume/ceph_volume/tests/util/test_arg_validators.py
src/ceph-volume/ceph_volume/tests/util/test_device.py
src/ceph-volume/ceph_volume/tests/util/test_disk.py
src/ceph-volume/ceph_volume/tests/util/test_encryption.py
src/ceph-volume/ceph_volume/tests/util/test_prepare.py
src/ceph-volume/ceph_volume/tests/util/test_system.py
src/ceph-volume/tox.ini