Launch Library: remove deprecated YAML import (#69008)

This commit is contained in:
Paulus Schoutsen
2022-03-31 20:23:52 +02:00
committed by GitHub
parent ce5d20eb8e
commit bb322a18bb
3 changed files with 2 additions and 59 deletions
@@ -3,29 +3,11 @@ from unittest.mock import patch
from homeassistant import data_entry_flow
from homeassistant.components.launch_library.const import DOMAIN
from homeassistant.components.launch_library.sensor import DEFAULT_NEXT_LAUNCH_NAME
from homeassistant.config_entries import SOURCE_IMPORT, SOURCE_USER
from homeassistant.const import CONF_NAME
from homeassistant.config_entries import SOURCE_USER
from tests.common import MockConfigEntry
async def test_import(hass):
"""Test entry will be imported."""
imported_config = {CONF_NAME: DEFAULT_NEXT_LAUNCH_NAME}
with patch(
"homeassistant.components.launch_library.async_setup_entry", return_value=True
):
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": SOURCE_IMPORT}, data=imported_config
)
assert result.get("type") == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
assert result.get("result").data == imported_config
async def test_create_entry(hass):
"""Test we can finish a config flow."""