Remove YAML support from harmony (#45140)

This commit is contained in:
J. Nick Koston
2021-01-13 22:45:32 -10:00
committed by GitHub
parent 23a73dc5b1
commit 4efe6762c4
4 changed files with 3 additions and 131 deletions

View File

@@ -49,49 +49,6 @@ async def test_user_form(hass):
assert len(mock_setup_entry.mock_calls) == 1
async def test_form_import(hass):
"""Test we get the form with import source."""
await setup.async_setup_component(hass, "persistent_notification", {})
harmonyapi = _get_mock_harmonyapi(connect=True)
with patch(
"homeassistant.components.harmony.util.HarmonyAPI",
return_value=harmonyapi,
), patch(
"homeassistant.components.harmony.async_setup", return_value=True
) as mock_setup, patch(
"homeassistant.components.harmony.async_setup_entry",
return_value=True,
) as mock_setup_entry:
result = await hass.config_entries.flow.async_init(
DOMAIN,
context={"source": config_entries.SOURCE_IMPORT},
data={
"host": "1.2.3.4",
"name": "friend",
"activity": "Watch TV",
"delay_secs": 0.9,
"unique_id": "555234534543",
},
)
await hass.async_block_till_done()
assert result["result"].unique_id == "555234534543"
assert result["type"] == "create_entry"
assert result["title"] == "friend"
assert result["data"] == {
"host": "1.2.3.4",
"name": "friend",
"activity": "Watch TV",
"delay_secs": 0.9,
}
# It is not possible to import options at this time
# so they end up in the config entry data and are
# used a fallback when they are not in options
assert len(mock_setup.mock_calls) == 1
assert len(mock_setup_entry.mock_calls) == 1
async def test_form_ssdp(hass):
"""Test we get the form with ssdp source."""
await setup.async_setup_component(hass, "persistent_notification", {})