add common cleanup for mocks to BaseTestCase in unit tests

Bug #1323214 reported by Ihar Hrachyshka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo-incubator
Fix Released
Undecided
Ihar Hrachyshka

Bug Description

BaseTestCase that is used in unit tests does not set mock.patch.stopall as a cleanup function, meaning each unit test that uses mock objects is forced to add its own cleanup. This can be enhanced by setting the cleanup function in the base test class.

Tags: oslotest
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo-incubator (master)

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

Changed in oslo:
assignee: nobody → Ihar Hrachyshka (ihar-hrachyshka)
status: New → In Progress
tags: added: oslotest
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslotest (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslotest (master)

Reviewed: https://review.openstack.org/95581
Committed: https://git.openstack.org/cgit/openstack/oslotest/commit/?id=3f6b7424ffb6e576b50346f338d64cc5e8289e6a
Submitter: Jenkins
Branch: master

commit 3f6b7424ffb6e576b50346f338d64cc5e8289e6a
Author: Ihar Hrachyshka <email address hidden>
Date: Mon May 26 22:06:43 2014 +0200

    Cleanup mock patches on BaseTestCase tearDown()

    Instead of cleaning up any remaining mock patches in each unit test that
    uses them, do it once on BaseTestCase tearDown().

    Change-Id: I121ba554e16d83fc5908bb85afee4940f42dc4eb
    Closes-Bug: 1323214

Changed in oslo:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in oslo:
milestone: none → juno-1
status: Fix Committed → Fix Released
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.