Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix more flaky translation checks #131824

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"])