Fix uncaught exceptions for mqtt (#33547)

now all mqtt tests pass
This commit is contained in:
Ziv authored and GitHub committed 2020-04-02 15:18:30 -07:00
1 parent 201e958854
commit 8fbdc703e0
2 files changed
+1 -20

No files matched your search

+1
View File
@@ -55,6 +55,7 @@ def mock_MQTT():
"""Make sure connection is established."""
with mock.patch("homeassistant.components.mqtt.MQTT") as mock_MQTT:
mock_MQTT.return_value.async_connect.return_value = mock_coro(True)
mock_MQTT.return_value.async_disconnect.return_value = mock_coro(True)
yield mock_MQTT