diff --git a/tripleoclient/tests/v1/baremetal/fakes.py b/tripleoclient/tests/v1/baremetal/fakes.py index 1a68887c6..e737f11ee 100644 --- a/tripleoclient/tests/v1/baremetal/fakes.py +++ b/tripleoclient/tests/v1/baremetal/fakes.py @@ -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 diff --git a/tripleoclient/tests/v1/overcloud_node/fakes.py b/tripleoclient/tests/v1/overcloud_node/fakes.py index 019bc9e94..d3678f7a7 100644 --- a/tripleoclient/tests/v1/overcloud_node/fakes.py +++ b/tripleoclient/tests/v1/overcloud_node/fakes.py @@ -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