From bf16b50679c25d91308163621c2be414af78e406 Mon Sep 17 00:00:00 2001 From: shred86 <32663154+shred86@users.noreply.github.com> Date: Sat, 28 Mar 2020 10:54:07 -0700 Subject: [PATCH] Fix Abode tests uncaught exceptions (#33365) --- tests/components/abode/conftest.py | 2 ++ tests/fixtures/abode_logout.json | 4 ++++ tests/ignore_uncaught_exceptions.py | 37 ----------------------------- 3 files changed, 6 insertions(+), 37 deletions(-) create mode 100644 tests/fixtures/abode_logout.json diff --git a/tests/components/abode/conftest.py b/tests/components/abode/conftest.py index 92f9bb09681..681f65ddf93 100644 --- a/tests/components/abode/conftest.py +++ b/tests/components/abode/conftest.py @@ -10,6 +10,8 @@ def requests_mock_fixture(requests_mock): """Fixture to provide a requests mocker.""" # Mocks the login response for abodepy. requests_mock.post(CONST.LOGIN_URL, text=load_fixture("abode_login.json")) + # Mocks the logout response for abodepy. + requests_mock.post(CONST.LOGOUT_URL, text=load_fixture("abode_logout.json")) # Mocks the oauth claims response for abodepy. requests_mock.get( CONST.OAUTH_TOKEN_URL, text=load_fixture("abode_oauth_claims.json") diff --git a/tests/fixtures/abode_logout.json b/tests/fixtures/abode_logout.json new file mode 100644 index 00000000000..53e242fced3 --- /dev/null +++ b/tests/fixtures/abode_logout.json @@ -0,0 +1,4 @@ +{ + "code": 200, + "message": "Logout successful." +} \ No newline at end of file diff --git a/tests/ignore_uncaught_exceptions.py b/tests/ignore_uncaught_exceptions.py index 8c961962ad5..34323f5b6d4 100644 --- a/tests/ignore_uncaught_exceptions.py +++ b/tests/ignore_uncaught_exceptions.py @@ -1,42 +1,5 @@ """List of modules that have uncaught exceptions today. Will be shrunk over time.""" IGNORE_UNCAUGHT_EXCEPTIONS = [ - ("tests.components.abode.test_alarm_control_panel", "test_entity_registry"), - ("tests.components.abode.test_alarm_control_panel", "test_attributes"), - ("tests.components.abode.test_alarm_control_panel", "test_set_alarm_away"), - ("tests.components.abode.test_alarm_control_panel", "test_set_alarm_home"), - ("tests.components.abode.test_alarm_control_panel", "test_set_alarm_standby"), - ("tests.components.abode.test_alarm_control_panel", "test_state_unknown"), - ("tests.components.abode.test_binary_sensor", "test_entity_registry"), - ("tests.components.abode.test_binary_sensor", "test_attributes"), - ("tests.components.abode.test_camera", "test_entity_registry"), - ("tests.components.abode.test_camera", "test_attributes"), - ("tests.components.abode.test_camera", "test_capture_image"), - ("tests.components.abode.test_cover", "test_entity_registry"), - ("tests.components.abode.test_cover", "test_attributes"), - ("tests.components.abode.test_cover", "test_open"), - ("tests.components.abode.test_cover", "test_close"), - ("tests.components.abode.test_init", "test_change_settings"), - ("tests.components.abode.test_light", "test_entity_registry"), - ("tests.components.abode.test_light", "test_attributes"), - ("tests.components.abode.test_light", "test_switch_off"), - ("tests.components.abode.test_light", "test_switch_on"), - ("tests.components.abode.test_light", "test_set_brightness"), - ("tests.components.abode.test_light", "test_set_color"), - ("tests.components.abode.test_light", "test_set_color_temp"), - ("tests.components.abode.test_lock", "test_entity_registry"), - ("tests.components.abode.test_lock", "test_attributes"), - ("tests.components.abode.test_lock", "test_lock"), - ("tests.components.abode.test_lock", "test_unlock"), - ("tests.components.abode.test_sensor", "test_entity_registry"), - ("tests.components.abode.test_sensor", "test_attributes"), - ("tests.components.abode.test_switch", "test_entity_registry"), - ("tests.components.abode.test_switch", "test_attributes"), - ("tests.components.abode.test_switch", "test_switch_on"), - ("tests.components.abode.test_switch", "test_switch_off"), - ("tests.components.abode.test_switch", "test_automation_attributes"), - ("tests.components.abode.test_switch", "test_turn_automation_off"), - ("tests.components.abode.test_switch", "test_turn_automation_on"), - ("tests.components.abode.test_switch", "test_trigger_automation"), ("tests.components.cast.test_media_player", "test_start_discovery_called_once"), ("tests.components.cast.test_media_player", "test_entry_setup_single_config"), ("tests.components.cast.test_media_player", "test_entry_setup_list_config"),