Only load translations for an integration once per test session (#117118)

This commit is contained in:
J. Nick Koston
2024-05-11 12:00:02 +09:00
committed by GitHub
parent 9e107a02db
commit d7aa24fa50
4 changed files with 55 additions and 9 deletions

View File

@@ -213,6 +213,7 @@ async def test_update_state_adds_entities_with_update_before_add_false(
assert not ent.update.called
@pytest.mark.usefixtures("disable_translations_once")
async def test_set_scan_interval_via_platform(hass: HomeAssistant) -> None:
"""Test the setting of the scan interval via platform."""
@@ -260,6 +261,7 @@ async def test_adding_entities_with_generator_and_thread_callback(
await component.async_add_entities(create_entity(i) for i in range(2))
@pytest.mark.usefixtures("disable_translations_once")
async def test_platform_warn_slow_setup(hass: HomeAssistant) -> None:
"""Warn we log when platform setup takes a long time."""
platform = MockPlatform()