Do not silence exceptions in overcloud_node unit tests

Change-Id: I1a53d15ac621c02c203f2c9b658bc92290012f6c
This commit is contained in:
Dmitry Tantsur 2019-03-11 12:26:04 +01:00
parent 9fd5b3ce6b
commit f3196716be
2 changed files with 4 additions and 2 deletions

View File

@ -51,7 +51,8 @@ class ClientWrapper(object):
self._mock_websocket = mock.Mock()
self._mock_websocket.__enter__ = mock.Mock(
return_value=self._mock_websocket)
self._mock_websocket.__exit__ = mock.Mock()
# Return False to avoid silencing exceptions
self._mock_websocket.__exit__ = mock.Mock(return_value=False)
def messaging_websocket(self):
return self._mock_websocket

View File

@ -24,7 +24,8 @@ class FakeClientWrapper(object):
self._mock_websocket = mock.Mock()
self._mock_websocket.__enter__ = mock.Mock(
return_value=self._mock_websocket)
self._mock_websocket.__exit__ = mock.Mock()
# Return False to avoid silencing exceptions
self._mock_websocket.__exit__ = mock.Mock(return_value=False)
def messaging_websocket(self):
return self._mock_websocket