cinder utils tests need to be converted to mock from mox

Bug #1285905 reported by Bill Owen on 2014-02-27
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Undecided
Bill Owen

Bug Description

As part of the effort to clean up cinder test, modules using mox are to be converted to use mock.

This bug is for the conversion of
cinder/tests/test_utils.py

Bill Owen (billowen) on 2014-02-27
Changed in cinder:
assignee: nobody → Bill Owen (billowen)
status: New → In Progress
Bill Owen (billowen) wrote :

Note: in testing these changes, a conflict between the tests in test_backup_ceph and test_utils caused two tests using mock_open to fail.
For more details see:
http://paste.openstack.org/show/70322/ and
http://paste.openstack.org/show/70372/

After quite a bit of head scratching, the issue was isolated to line 135 of paste 70372. But, no straight forward fix, or relationship between the two problems was found.

To work around the problem, I modified test_utils to test_read_cached_file and test_read_modified_cached_file to use a local impl of mock_open rather than mock.mock_open.

Reviewed: https://review.openstack.org/77012
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=5c37a03ea71311f5d3e1372f9e16e32eca002456
Submitter: Jenkins
Branch: master

commit 5c37a03ea71311f5d3e1372f9e16e32eca002456
Author: Bill Owen <email address hidden>
Date: Thu Feb 27 10:58:14 2014 -0700

    Convert cinder utils tests to use mock

    Convert the tests using mox to use mock. Also add several
    new tests to increase overall test coverage.

    Closes-bug: 1285905
    Change-Id: Ic7ed128e860aec50f135a9fd8728b868b27640ba

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2014-03-27
Changed in cinder:
milestone: none → icehouse-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-04-17
Changed in cinder:
milestone: icehouse-rc1 → 2014.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers