Fixup test_git_reinstall_exception()
This commit is contained in:
parent
371520a005
commit
7c5e9fb91b
@ -73,8 +73,9 @@ class TestNeutronAPIActions(CharmTestCase):
|
|||||||
@patch.object(git_reinstall, 'action_set')
|
@patch.object(git_reinstall, 'action_set')
|
||||||
@patch.object(git_reinstall, 'action_fail')
|
@patch.object(git_reinstall, 'action_fail')
|
||||||
@patch.object(git_reinstall, 'git_install')
|
@patch.object(git_reinstall, 'git_install')
|
||||||
|
@patch('traceback.format_exc')
|
||||||
@patch('charmhelpers.contrib.openstack.utils.config')
|
@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):
|
action_fail, action_set):
|
||||||
_config.return_value = openstack_origin_git
|
_config.return_value = openstack_origin_git
|
||||||
e = OSError('something bad happened')
|
e = OSError('something bad happened')
|
||||||
@ -88,6 +89,7 @@ class TestNeutronAPIActions(CharmTestCase):
|
|||||||
" File \"/usr/lib/python2.7/dist-packages/mock.py\", line 1019, in _mock_call\n" # noqa
|
" File \"/usr/lib/python2.7/dist-packages/mock.py\", line 1019, in _mock_call\n" # noqa
|
||||||
" raise effect\n"
|
" raise effect\n"
|
||||||
"OSError: something bad happened\n")
|
"OSError: something bad happened\n")
|
||||||
|
format_exc.return_value = traceback
|
||||||
|
|
||||||
git_reinstall.git_reinstall()
|
git_reinstall.git_reinstall()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user