Fix slower tests in sonarr (#39073)

This commit is contained in:
Chris Talkington authored and GitHub committed 2020-08-20 12:21:58 +02:00
1 parent d3389fa22e
commit da5dc1130e
3 files changed
+55 -38

No files matched your search

+5 -1
View File
@@ -7,6 +7,7 @@ from homeassistant.config_entries import (
)
from homeassistant.core import HomeAssistant
from tests.async_mock import patch
from tests.components.sonarr import setup_integration
from tests.test_util.aiohttp import AiohttpClientMocker
@@ -23,7 +24,10 @@ async def test_unload_config_entry(
hass: HomeAssistant, aioclient_mock: AiohttpClientMocker
) -> None:
"""Test the configuration entry unloading."""
entry = await setup_integration(hass, aioclient_mock)
with patch(
"homeassistant.components.sonarr.sensor.async_setup_entry", return_value=True,
):
entry = await setup_integration(hass, aioclient_mock)
assert hass.data[DOMAIN]
assert entry.entry_id in hass.data[DOMAIN]