Ensure cast tests add config entry before updating it (#110441)

* Ensure cast tests add config entry before updating it

* time to walk away for a bit

* missed two
pull/110452/head
J. Nick Koston 2024-02-12 22:01:37 -06:00 committed by GitHub
parent 0e1cdc1f79
commit 77f416fa04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -13,7 +13,9 @@ from tests.common import MockConfigEntry, async_mock_signal
async def test_service_show_view(hass: HomeAssistant, mock_zeroconf: None) -> None:
"""Test showing a view."""
await home_assistant_cast.async_setup_ha_cast(hass, MockConfigEntry())
entry = MockConfigEntry(domain=DOMAIN)
entry.add_to_hass(hass)
await home_assistant_cast.async_setup_ha_cast(hass, entry)
calls = async_mock_signal(hass, home_assistant_cast.SIGNAL_HASS_CAST_SHOW_VIEW)
# No valid URL
@ -87,7 +89,9 @@ async def test_use_cloud_url(hass: HomeAssistant, mock_zeroconf: None) -> None:
)
hass.config.components.add("cloud")
await home_assistant_cast.async_setup_ha_cast(hass, MockConfigEntry())
entry = MockConfigEntry(domain=DOMAIN)
entry.add_to_hass(hass)
await home_assistant_cast.async_setup_ha_cast(hass, entry)
calls = async_mock_signal(hass, home_assistant_cast.SIGNAL_HASS_CAST_SHOW_VIEW)
with patch(