From 8fbdc703e015e4c9e582d498e154b675c7aab938 Mon Sep 17 00:00:00 2001 From: Ziv <16467659+ziv1234@users.noreply.github.com> Date: Fri, 3 Apr 2020 01:18:30 +0300 Subject: [PATCH] Fix uncaught exceptions for mqtt (#33547) now all mqtt tests pass --- tests/components/mqtt/test_init.py | 1 + tests/ignore_uncaught_exceptions.py | 20 -------------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/tests/components/mqtt/test_init.py b/tests/components/mqtt/test_init.py index 29cece92e64..60ca91b0052 100644 --- a/tests/components/mqtt/test_init.py +++ b/tests/components/mqtt/test_init.py @@ -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 diff --git a/tests/ignore_uncaught_exceptions.py b/tests/ignore_uncaught_exceptions.py index 126cb37f14f..ad8ec114eaf 100644 --- a/tests/ignore_uncaught_exceptions.py +++ b/tests/ignore_uncaught_exceptions.py @@ -48,26 +48,6 @@ IGNORE_UNCAUGHT_EXCEPTIONS = [ ("tests.components.ios.test_init", "test_creating_entry_sets_up_sensor"), ("tests.components.ios.test_init", "test_not_configuring_ios_not_creates_entry"), ("tests.components.local_file.test_camera", "test_file_not_readable"), - ( - "tests.components.mqtt.test_init", - "test_setup_uses_certificate_on_certificate_set_to_auto", - ), - ( - "tests.components.mqtt.test_init", - "test_setup_does_not_use_certificate_on_mqtts_port", - ), - ( - "tests.components.mqtt.test_init", - "test_setup_without_tls_config_uses_tlsv1_under_python36", - ), - ( - "tests.components.mqtt.test_init", - "test_setup_with_tls_config_uses_tls_version1_2", - ), - ( - "tests.components.mqtt.test_init", - "test_setup_with_tls_config_of_v1_under_python36_only_uses_v1", - ), ("tests.components.qwikswitch.test_init", "test_binary_sensor_device"), ("tests.components.qwikswitch.test_init", "test_sensor_device"), ("tests.components.rflink.test_init", "test_send_command_invalid_arguments"),