Skip to content

Commit

Permalink
Fix more flaky translation checks (#131824)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet authored and frenck committed Nov 28, 2024
1 parent 9677c6e commit e08b710
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions tests/components/stt/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
mock_integration,
mock_platform,
mock_restore_cache,
reset_translation_cache,
)
from tests.typing import ClientSessionGenerator, WebSocketGenerator

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/components/tts/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])

0 comments on commit e08b710

Please sign in to comment.