Cleanup test config entry setup to use best practices (#110070)

* Cleanup test config entry setup to use best practices

* Add missed files
This commit is contained in:
Allen Porter 2024-02-08 19:52:40 -08:00 committed by GitHub
parent 2d8d6ce642
commit 261f9c5d62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 29 additions and 29 deletions

View file

@ -26,7 +26,7 @@ async def test_load_unload(
assert config_entry.state == ConfigEntryState.NOT_LOADED
with patch("homeassistant.components.caldav.config_flow.caldav.DAVClient"):
await config_entry.async_setup(hass)
await hass.config_entries.async_setup(config_entry.entry_id)
assert config_entry.state == ConfigEntryState.LOADED
@ -63,7 +63,7 @@ async def test_client_failure(
"homeassistant.components.caldav.config_flow.caldav.DAVClient"
) as mock_client:
mock_client.return_value.principal.side_effect = side_effect
await config_entry.async_setup(hass)
await hass.config_entries.async_setup(config_entry.entry_id)
await hass.async_block_till_done()
assert config_entry.state == expected_state