]> git.apps.os.sepia.ceph.com Git - ceph.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>
Mon, 24 Feb 2025 11:56:28 +0000 (11:56 +0000)
commit111530c9f9af5edd794c1f92b985134d991b8188
tree5e9c86e556d8c0b4d7022a606e07571a421124ca
parent216ced39bc205a3c1e2d626450c23b5c969ffb0e
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>
(cherry picked from commit 55c3ac55dcedaf185c96ad37d799d6f65ff203df)
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