Need to replace legacy StubOutForTesting class

Bug #1415602 reported by Clinton Knight
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
High
Clinton Knight

Bug Description

The Manila test class uses a class called StubOutForTesting, which is an awkward holdover from when the unit tests were using Mox. Alex wrote a more elegant and capable mocker method, manila.test.TestCase.mock_object, in the Cinder project which we have now added to Manila. So to remove the duplicate functionality and legacy code, all references to self.stubs.Set() in the Manila tests should be replaced with self.mock_object().

Changed in manila:
assignee: nobody → Clinton Knight (clintonk)
Changed in manila:
milestone: none → kilo-2
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.openstack.org/152324

Changed in manila:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/152324
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=65d1158526d9597506bf1d29e8a219e76ce6866b
Submitter: Jenkins
Branch: master

commit 65d1158526d9597506bf1d29e8a219e76ce6866b
Author: Clinton Knight <email address hidden>
Date: Wed Jan 28 14:35:02 2015 -0500

    Replace legacy StubOutForTesting class

    The Manila test module uses a class called StubOutForTesting, which
    is an awkward holdover from when the unit tests were using Mox.
    Alex wrote a more elegant and capable mocker method,
    manila.test.TestCase.mock_object, in the Cinder project which we
    have now added to Manila. So to remove the duplicate functionality
    and legacy code, all references to self.stubs.Set() in the Manila
    tests should be replaced with self.mock_object() and any related
    dead code should be removed.

    Resolves-bug: #1415602
    Change-Id: Ie5f203c0b2cb57ad00d9ec8db0529075b6fef261

Changed in manila:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in manila:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in manila:
milestone: kilo-2 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.