Fixup test_git_reinstall_exception()

This commit is contained in:
Corey Bryant 2015-04-15 14:58:18 +00:00
parent 709209244d
commit cb986e56bf

View File

@ -75,8 +75,9 @@ class TestnovaAPIActions(CharmTestCase):
@patch.object(git_reinstall, 'action_set')
@patch.object(git_reinstall, 'action_fail')
@patch.object(git_reinstall, 'git_install')
@patch('traceback.format_exc')
@patch('charmhelpers.contrib.openstack.utils.config')
def test_git_reinstall_exception(self, _config, git_install,
def test_git_reinstall_exception(self, _config, format_exc, git_install,
action_fail, action_set):
_config.return_value = openstack_origin_git
e = OSError('something bad happened')
@ -90,6 +91,7 @@ class TestnovaAPIActions(CharmTestCase):
" File \"/usr/lib/python2.7/dist-packages/mock.py\", line 1019, in _mock_call\n" # noqa
" raise effect\n"
"OSError: something bad happened\n")
format_exc.return_value = traceback
git_reinstall.git_reinstall()