Replace mox with mock in glance unit tests

Registered by Anastasia Latynskaya

Mox should be replaced by mock in glance unit tests, because:
1) mox library's quality is worse than mock one's;
2) it's more difficult for a developer to write unit tests using mox than mock;
3) mox is not comparable with py3.

Blueprint information

Status:
Started
Approver:
Mark Washenberger
Priority:
Low
Drafter:
Anastasia Latynskaya
Direction:
Approved
Assignee:
Anastasia Latynskaya
Definition:
Approved
Series goal:
Accepted for future
Implementation:
Started
Milestone target:
milestone icon ongoing
Started by
Mark Washenberger

Related branches

Sprints

Whiteboard

In general I am sympathetic with this goal. However
1) The quality of mox doesn't seem to matter for existing tests--its a sunk cost.
2) It is 100% okay for developers to add mock-based tests today to glance and avoid adding more mox tests--in fact this approach is preferred.
3) The OpenStack community intends to port mox to python3 as a compatibility concern.

My concern here is adding code and review churn, and creating situations near the end of the icehouse cycle where its easy to accidentally make subtle changes to the tests that prevent us from catching bugs.

So, I'm tempted not to accept this for Icehouse. However, we can reconsider it for juno.
-markwash

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

Addressed by: https://review.openstack.org/74324
    Replacement mox by mock

Addressed by: https://review.openstack.org/74613
    Replacement mox by mock

Addressed by: https://review.openstack.org/74619
    Replacement mox by mock

Addressed by: https://review.openstack.org/111995
    Replacement mox by mock

Addressed by: https://review.openstack.org/112784
    Replacement mox by mock

Addressed by: https://review.openstack.org/114906
    Replacement mox by mock

Gerrit topic: https://review.openstack.org/#q,topic:bp/s,n,z

Addressed by: https://review.openstack.org/431099
    Replace mox with mock.

Gerrit topic: https://review.openstack.org/#q,topic:bp/goal,n,z

Addressed by: https://review.openstack.org/589376
    Replace mox with mock

Addressed by: https://review.openstack.org/589683
    Replace mox with mock

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.