make sure bootstrap unblocks as well

This commit is contained in:
J. Nick Koston
2024-06-12 16:38:38 -05:00
parent 2ab5f48bd6
commit 219bb697da

View File

@@ -13,7 +13,7 @@ from unittest.mock import AsyncMock, Mock, patch
import pytest
from typing_extensions import Generator
from homeassistant import bootstrap, loader, runner
from homeassistant import block_async_io, bootstrap, loader, runner
import homeassistant.config as config_util
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_DEBUG, SIGNAL_BOOTSTRAP_INTEGRATIONS
@@ -55,6 +55,13 @@ async def apply_stop_hass(stop_hass: None) -> None:
"""Make sure all hass are stopped."""
@pytest.fixture(autouse=True)
def unpatch_block_async_io():
"""Unpatch block_async_io after each test."""
yield
block_async_io.disable()
@pytest.fixture(scope="module", autouse=True)
def mock_http_start_stop() -> Generator[None]:
"""Mock HTTP start and stop."""