mirror of
https://github.com/home-assistant/core.git
synced 2025-08-02 01:58:20 +00:00
Reset esphome DomainData cache inbetween tests
This commit is contained in:
parent
26d48e20dd
commit
8e2011a100
@ -27,7 +27,7 @@ from aioesphomeapi import (
|
||||
import pytest
|
||||
from zeroconf import Zeroconf
|
||||
|
||||
from homeassistant.components.esphome import dashboard
|
||||
from homeassistant.components.esphome import dashboard, domain_data
|
||||
from homeassistant.components.esphome.const import (
|
||||
CONF_ALLOW_SERVICE_CALLS,
|
||||
CONF_BLUETOOTH_MAC_ADDRESS,
|
||||
@ -112,6 +112,12 @@ def mock_tts(mock_tts_cache_dir: Path) -> None:
|
||||
"""Auto mock the tts cache."""
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def reset_domain_data_cache() -> None:
|
||||
"""Reset the DomainData cache."""
|
||||
domain_data.DomainData.get.cache_clear()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_config_entry(hass: HomeAssistant) -> MockConfigEntry:
|
||||
"""Return the default mocked config entry."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user