Patch import where its used in Axis hub test (#122674)

This commit is contained in:
Robert Svensson 2024-07-26 23:33:37 +02:00 committed by GitHub
parent 57554aba57
commit c486baccaa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -200,7 +200,10 @@ async def test_get_axis_api_errors(
) -> None:
"""Failed setup schedules a retry of setup."""
config_entry.add_to_hass(hass)
with patch("axis.interfaces.vapix.Vapix.initialize", side_effect=side_effect):
with patch(
"homeassistant.components.axis.hub.api.axis.interfaces.vapix.Vapix.initialize",
side_effect=side_effect,
):
await hass.config_entries.async_setup(config_entry.entry_id)
await hass.async_block_till_done()
assert config_entry.state == state