Fix reolink media source data access (#114593)
* Add test * Fix reolink media source data access
This commit is contained in:
parent
acdb3cc7a2
commit
b1af590eed
2 changed files with 21 additions and 6 deletions
|
@ -65,6 +65,17 @@ async def setup_component(hass: HomeAssistant) -> None:
|
|||
assert await async_setup_component(hass, MEDIA_STREAM_DOMAIN, {})
|
||||
|
||||
|
||||
async def test_platform_loads_before_config_entry(
|
||||
hass: HomeAssistant,
|
||||
mock_setup_entry: AsyncMock,
|
||||
) -> None:
|
||||
"""Test that the platform can be loaded before the config entry."""
|
||||
# Fake that the config entry is not loaded before the media_source platform
|
||||
assert await async_setup_component(hass, DOMAIN, {})
|
||||
await hass.async_block_till_done()
|
||||
assert mock_setup_entry.call_count == 0
|
||||
|
||||
|
||||
async def test_resolve(
|
||||
hass: HomeAssistant,
|
||||
reolink_connect: MagicMock,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue