mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Migrate remaining calls in config modules to async_get_component (#112293)
* Migrate remaining calls in config modules to async_get_component There were a few cases that were still using get_component that could have done blocking I/O in the event loop, although it was unlikely. The caching check in async_get_component has been moved up to avoid creating the future if the module is already in the cache * fix one more
This commit is contained in:
@ -617,7 +617,7 @@ async def test_async_when_setup_or_start_already_loaded(hass: HomeAssistant) ->
|
||||
async def test_setup_import_blows_up(hass: HomeAssistant) -> None:
|
||||
"""Test that we handle it correctly when importing integration blows up."""
|
||||
with patch(
|
||||
"homeassistant.loader.Integration.get_component", side_effect=ImportError
|
||||
"homeassistant.loader.Integration.async_get_component", side_effect=ImportError
|
||||
):
|
||||
assert not await setup.async_setup_component(hass, "sun", {})
|
||||
|
||||
|
Reference in New Issue
Block a user