mirror of
https://github.com/home-assistant/core.git
synced 2025-07-31 19:25:12 +02:00
Catch all exceptions on import component/platform (#64930)
This commit is contained in:
@@ -577,7 +577,7 @@ async def test_async_when_setup_or_start_already_loaded(hass):
|
||||
async def test_setup_import_blows_up(hass):
|
||||
"""Test that we handle it correctly when importing integration blows up."""
|
||||
with patch(
|
||||
"homeassistant.loader.Integration.get_component", side_effect=ValueError
|
||||
"homeassistant.loader.Integration.get_component", side_effect=ImportError
|
||||
):
|
||||
assert not await setup.async_setup_component(hass, "sun", {})
|
||||
|
||||
|
Reference in New Issue
Block a user