]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Preserve mock side_effect’s in test_pure
authorPatrick East <patrick.east@purestorage.com>
Mon, 13 Jul 2015 20:42:46 +0000 (13:42 -0700)
committerPatrick East <patrick.east@purestorage.com>
Mon, 13 Jul 2015 21:08:33 +0000 (14:08 -0700)
commit56e0f93e6bd83869e359080218bb63acbf4cc9db
tree4f027b496d3427e67006d978fd9f2e6f36647718
parent409bc281838a1c1399940a92a72d1192c6cd480d
Preserve mock side_effect’s in test_pure

The helper method to test if exceptions are propagated or handled would
unset the mock objects side_effect value when its done. This overrides
the original value making the mock not behave as expected as soon as it
is passed into assert_error_propagates.

This changes the helper to store the original side effect and then put
it back once we are done making it throw an exception.

Change-Id: I71900071a1c050913b7283aa743a17c24da1a6b9
Closes-Bug: #1474130
cinder/tests/unit/test_pure.py