1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Fix translations merging (#34417)

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
Paulus Schoutsen
2020-04-19 12:37:44 -07:00
committed by GitHub
parent e5a861dc90
commit d10f5a48d4
2 changed files with 21 additions and 4 deletions

View File

@@ -192,3 +192,17 @@ async def test_get_translations_while_loading_components(hass):
"component.component1.title": "Component 1",
"component.component1.hello": "world",
}
async def test_get_translation_categories(hass):
"""Test the get translations helper loads config flow translations."""
with patch.object(translation, "async_get_config_flows", return_value={"light"}):
translations = await translation.async_get_translations(
hass, "en", "title", None, True
)
assert "component.light.title" in translations
translations = await translation.async_get_translations(
hass, "en", "device_automation", None, True
)
assert "component.light.device_automation.action_type.turn_on" in translations