Fix more flaky translation checks (#131824)

pull/128310/head^2
epenet 2024-11-28 13:41:30 +01:00 committed by GitHub
parent d9832f8c3a
commit c4e5b59326
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -34,6 +34,7 @@ from tests.common import (
mock_integration,
mock_platform,
mock_restore_cache,
reset_translation_cache,
)
from tests.typing import ClientSessionGenerator, WebSocketGenerator
@ -518,6 +519,9 @@ async def test_default_engine_prefer_cloud_entity(
assert provider_engine.name == "test"
assert async_default_engine(hass) == "stt.cloud_stt_entity"
# Reset the `cloud` translations cache to avoid flaky translation checks
reset_translation_cache(hass, ["cloud"])
async def test_get_engine_legacy(
hass: HomeAssistant, tmp_path: Path, mock_provider: MockSTTProvider

View File

@ -1990,5 +1990,5 @@ async def test_default_engine_prefer_cloud_entity(
assert provider_engine == "test"
assert tts.async_default_engine(hass) == "tts.cloud_tts_entity"
# Reset the `cloud` translations cache
# Reset the `cloud` translations cache to avoid flaky translation checks
reset_translation_cache(hass, ["cloud"])