mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 09:17:53 +00:00
Fix lingering hassio issues test (#113569)
This commit is contained in:
parent
b26928878f
commit
6e84dbde35
@ -2,12 +2,13 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from datetime import timedelta
|
||||
from http import HTTPStatus
|
||||
import os
|
||||
from typing import Any
|
||||
from unittest.mock import ANY, patch
|
||||
|
||||
from freezegun.api import FrozenDateTimeFactory
|
||||
import pytest
|
||||
|
||||
from homeassistant.components.repairs import DOMAIN as REPAIRS_DOMAIN
|
||||
@ -536,6 +537,7 @@ async def test_supervisor_issues_initial_failure(
|
||||
hass: HomeAssistant,
|
||||
aioclient_mock: AiohttpClientMocker,
|
||||
hass_ws_client: WebSocketGenerator,
|
||||
freezer: FrozenDateTimeFactory,
|
||||
) -> None:
|
||||
"""Test issues manager retries after initial update failure."""
|
||||
responses = [
|
||||
@ -600,7 +602,8 @@ async def test_supervisor_issues_initial_failure(
|
||||
assert msg["success"]
|
||||
assert len(msg["result"]["issues"]) == 0
|
||||
|
||||
await asyncio.sleep(0.1)
|
||||
freezer.tick(timedelta(milliseconds=200))
|
||||
await hass.async_block_till_done()
|
||||
await client.send_json({"id": 2, "type": "repairs/list_issues"})
|
||||
msg = await client.receive_json()
|
||||
assert msg["success"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user