mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
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
This commit is contained in:
parent
0e1cdc1f79
commit
77f416fa04
@ -13,7 +13,9 @@ from tests.common import MockConfigEntry, async_mock_signal
|
|||||||
|
|
||||||
async def test_service_show_view(hass: HomeAssistant, mock_zeroconf: None) -> None:
|
async def test_service_show_view(hass: HomeAssistant, mock_zeroconf: None) -> None:
|
||||||
"""Test showing a view."""
|
"""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)
|
calls = async_mock_signal(hass, home_assistant_cast.SIGNAL_HASS_CAST_SHOW_VIEW)
|
||||||
|
|
||||||
# No valid URL
|
# No valid URL
|
||||||
@ -87,7 +89,9 @@ async def test_use_cloud_url(hass: HomeAssistant, mock_zeroconf: None) -> None:
|
|||||||
)
|
)
|
||||||
hass.config.components.add("cloud")
|
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)
|
calls = async_mock_signal(hass, home_assistant_cast.SIGNAL_HASS_CAST_SHOW_VIEW)
|
||||||
|
|
||||||
with patch(
|
with patch(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user