Fix Abode tests uncaught exceptions (#33365)

This commit is contained in:
shred86 2020-03-28 10:54:07 -07:00 committed by GitHub
parent 5a1b0edd96
commit bf16b50679
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 37 deletions

View File

@ -10,6 +10,8 @@ def requests_mock_fixture(requests_mock):
"""Fixture to provide a requests mocker.""" """Fixture to provide a requests mocker."""
# Mocks the login response for abodepy. # Mocks the login response for abodepy.
requests_mock.post(CONST.LOGIN_URL, text=load_fixture("abode_login.json")) 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. # Mocks the oauth claims response for abodepy.
requests_mock.get( requests_mock.get(
CONST.OAUTH_TOKEN_URL, text=load_fixture("abode_oauth_claims.json") CONST.OAUTH_TOKEN_URL, text=load_fixture("abode_oauth_claims.json")

4
tests/fixtures/abode_logout.json vendored Normal file
View File

@ -0,0 +1,4 @@
{
"code": 200,
"message": "Logout successful."
}

View File

@ -1,42 +1,5 @@
"""List of modules that have uncaught exceptions today. Will be shrunk over time.""" """List of modules that have uncaught exceptions today. Will be shrunk over time."""
IGNORE_UNCAUGHT_EXCEPTIONS = [ 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_start_discovery_called_once"),
("tests.components.cast.test_media_player", "test_entry_setup_single_config"), ("tests.components.cast.test_media_player", "test_entry_setup_single_config"),
("tests.components.cast.test_media_player", "test_entry_setup_list_config"), ("tests.components.cast.test_media_player", "test_entry_setup_list_config"),