Delay creation of Reolink repair issues (#97476)

* delay creation of repair issues

* fix tests
This commit is contained in:
starkillerOG 2023-07-31 09:07:13 +02:00 committed by GitHub
parent f218fb8cee
commit b266514068
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 19 deletions

View file

@ -116,7 +116,14 @@ async def test_https_repair_issue(
hass, {"country": "GB", "internal_url": "https://test_homeassistant_address"}
)
assert await hass.config_entries.async_setup(config_entry.entry_id)
with patch(
"homeassistant.components.reolink.host.FIRST_ONVIF_TIMEOUT", new=0
), patch(
"homeassistant.components.reolink.host.FIRST_ONVIF_LONG_POLL_TIMEOUT", new=0
), patch(
"homeassistant.components.reolink.host.ReolinkHost._async_long_polling",
):
assert await hass.config_entries.async_setup(config_entry.entry_id)
await hass.async_block_till_done()
issue_registry = ir.async_get(hass)
@ -150,6 +157,8 @@ async def test_webhook_repair_issue(
"""Test repairs issue is raised when the webhook url is unreachable."""
with patch(
"homeassistant.components.reolink.host.FIRST_ONVIF_TIMEOUT", new=0
), patch(
"homeassistant.components.reolink.host.FIRST_ONVIF_LONG_POLL_TIMEOUT", new=0
), patch(
"homeassistant.components.reolink.host.ReolinkHost._async_long_polling",
):