Fix slower tests in sonarr (#39073)
This commit is contained in:
1 parent
d3389fa22e
commit
da5dc1130e
3 files changed
+55
-38
No files matched your search
@@ -18,6 +18,7 @@ from homeassistant.const import (
|
||||
)
|
||||
from homeassistant.helpers.typing import HomeAssistantType
|
||||
|
||||
from tests.async_mock import patch
|
||||
from tests.common import MockConfigEntry, load_fixture
|
||||
from tests.test_util.aiohttp import AiohttpClientMocker
|
||||
|
||||
@@ -196,6 +197,10 @@ async def setup_integration(
|
||||
CONF_UPCOMING_DAYS: DEFAULT_UPCOMING_DAYS,
|
||||
CONF_WANTED_MAX_ITEMS: DEFAULT_WANTED_MAX_ITEMS,
|
||||
},
|
||||
options={
|
||||
CONF_UPCOMING_DAYS: DEFAULT_UPCOMING_DAYS,
|
||||
CONF_WANTED_MAX_ITEMS: DEFAULT_WANTED_MAX_ITEMS,
|
||||
},
|
||||
)
|
||||
|
||||
entry.add_to_hass(hass)
|
||||
@@ -215,3 +220,17 @@ async def setup_integration(
|
||||
await hass.async_block_till_done()
|
||||
|
||||
return entry
|
||||
|
||||
|
||||
def _patch_async_setup(return_value=True):
|
||||
"""Patch the async setup of sonarr."""
|
||||
return patch(
|
||||
"homeassistant.components.sonarr.async_setup", return_value=return_value
|
||||
)
|
||||
|
||||
|
||||
def _patch_async_setup_entry(return_value=True):
|
||||
"""Patch the async entry setup of sonarr."""
|
||||
return patch(
|
||||
"homeassistant.components.sonarr.async_setup_entry", return_value=return_value,
|
||||
)
|
||||
Reference in new issue
Block a user