Replace usage of Mox with mock in tests

Registered by Roman Bogorodskiy on 2013-07-26

Mox should be dropped from tests in favor of mock.

http://lists.openstack.org/pipermail/openstack-dev/2013-July/012484.html

Blueprint information

Status:
Complete
Approver:
Russell Bryant
Priority:
Low
Drafter:
Roman Bogorodskiy
Direction:
Needs approval
Assignee:
Roman Bogorodskiy
Definition:
Obsolete
Series goal:
None
Implementation:
Not started
Milestone target:
None
Completed by
Russell Bryant on 2013-08-29

Related branches

Sprints

Whiteboard

Thread about this: http://lists.openstack.org/pipermail/openstack-dev/2013-July/012580.html

To find list of tests that are still using mox:

find nova/tests -name "*.py"|xargs grep -i mox|cut -d":" -f 1|uniq|sort|less

Gerrit topic: https://review.openstack.org/#q,topic:bp/mox-to-mock-conversion,n,z

Addressed by: https://review.openstack.org/156548
    Convert mox to mock: tests/compute/test_utils.py

Gerrit topic: https://review.openstack.org/#q,topic:bug/1581230,n,z

Addressed by: https://review.openstack.org/352572
    Replace mox with mock in test_cinder

(?)

Work Items

Work items:
api/ec2/test_api.py: INPROGRESS
api/openstack/compute/contrib/test_admin_actions.py: TODO
api/openstack/compute/contrib/test_baremetal_nodes.py: TODO
api/openstack/compute/contrib/test_cells.py: TODO
api/openstack/compute/contrib/test_deferred_delete.py: TODO
api/openstack/compute/contrib/test_migrations.py: TODO
api/openstack/compute/contrib/test_quotas.py: TODO
api/openstack/compute/contrib/test_security_groups.py: TODO
api/openstack/compute/contrib/test_server_start_stop.py: TODO
api/openstack/compute/contrib/test_used_limits.py: TODO
api/openstack/compute/plugins/v3/test_admin_actions.py: TODO
api/openstack/compute/plugins/v3/test_baremetal_nodes.py: TODO
api/openstack/compute/plugins/v3/test_cells.py: TODO
api/openstack/compute/plugins/v3/test_deferred_delete.py: TODO
api/openstack/compute/plugins/v3/test_images.py: TODO
api/openstack/compute/plugins/v3/test_migrations.py: TODO
api/openstack/compute/plugins/v3/test_quota_sets.py: TODO
api/openstack/compute/plugins/v3/test_security_groups.py: TODO
api/openstack/compute/plugins/v3/test_servers.py: TODO
api/openstack/compute/plugins/v3/test_used_limits.py: TODO
api/openstack/compute/test_extensions.py: TODO
api/openstack/compute/test_images.py: TODO
api/openstack/compute/test_server_actions.py: TODO
⚒ api/openstack/compute/test_servers.py: TODO
cells/fakes.py: TODO
cells/test_cells_manager.py: TODO
cells/test_cells_messaging.py: TODO
cells/test_cells_rpc_driver.py: TODO
compute/test_compute_api.py: TODO
compute/test_compute_cells.py: TODO
compute/test_compute_mgr.py: TODO
compute/test_compute.py: TODO
compute/test_host_api.py: TODO
compute/test_shelve.py: TODO
compute/test_virtapi.py: TODO
conductor/tasks/test_live_migrate.py: TODO
conductor/test_conductor.py: TODO
consoleauth/test_consoleauth.py: TODO
console/test_console.py: TODO
db/test_db_api.py: INPROGRESS
image/test_s3.py: TODO
integrated/test_api_samples.py: TODO
network/security_group/test_neutron_driver.py: TODO
network/test_api.py: TODO
network/test_linux_net.py: TODO
network/test_manager.py: TODO
network/test_neutronv2.py: TODO
objects/test_instance_fault.py: TODO
objects/test_instance_info_cache.py: TODO
objects/test_instance.py: TODO
objects/test_security_group.py: TODO
scheduler/fakes.py: TODO
scheduler/test_chance_scheduler.py: TODO
scheduler/test_filter_scheduler.py: TODO
scheduler/test_filters.py: TODO
scheduler/test_host_manager.py: TODO
scheduler/test_scheduler.py: TODO
scheduler/test_weights.py: TODO
servicegroup/test_db_servicegroup.py: TODO
servicegroup/test_mc_servicegroup.py: TODO
test_configdrive2.py: TODO
test_crypto.py: TODO
test_metadata.py: TODO
test_service.py: TODO
test_utils.py: TODO
virt/baremetal/test_driver.py: TODO
virt/baremetal/test_ipmi.py: TODO
virt/baremetal/test_nova_baremetal_deploy_helper.py: TODO
virt/baremetal/test_pxe.py: TODO
virt/baremetal/test_tilera_pdu.py: TODO
virt/baremetal/test_tilera.py: TODO
virt/baremetal/test_utils.py: TODO
virt/baremetal/test_virtual_power_driver.py: TODO
virt/hyperv/test_hypervapi.py: TODO
virt/libvirt/test_imagebackend.py: TODO
virt/libvirt/test_image_utils.py: TODO
virt/libvirt/test_libvirt.py: TODO
virt/libvirt/test_libvirt_utils.py: TODO
virt/powervm/test_powervm.py: TODO
virt/vmwareapi/test_vmwareapi.py: TODO
virt/vmwareapi/test_vmwareapi_vif.py: TODO
virt/xenapi/imageupload/test_glance.py: TODO
virt/xenapi/test_vmops.py: TODO
virt/xenapi/test_vm_utils.py: TODO
virt/xenapi/test_volumeops.py: TODO
virt/xenapi/test_xenapi.py: TODO
⚒ volume/test_cinder.py: TODO

This blueprint contains Public information 
Everyone can see this information.