Fix reolink media source data access (#114593)

* Add test

* Fix reolink media source data access
This commit is contained in:
Martin Hjelmare 2024-04-02 00:14:13 +02:00 committed by GitHub
parent acdb3cc7a2
commit b1af590eed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 6 deletions

View file

@ -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,