mirror of
https://github.com/home-assistant/core.git
synced 2026-09-28 02:18:10 -04:00
Deprecate YAML config for Ambient PWs (2021.9.0 removal) (#52459)
This commit is contained in:
@@ -83,27 +83,6 @@ async def test_show_form(hass):
|
||||
assert result["step_id"] == "user"
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"get_devices_response",
|
||||
[mock_coro(return_value=json.loads(load_fixture("ambient_devices.json")))],
|
||||
)
|
||||
async def test_step_import(hass, mock_aioambient):
|
||||
"""Test that the import step works."""
|
||||
conf = {CONF_API_KEY: "12345abcde12345abcde", CONF_APP_KEY: "67890fghij67890fghij"}
|
||||
|
||||
flow = config_flow.AmbientStationFlowHandler()
|
||||
flow.hass = hass
|
||||
flow.context = {"source": SOURCE_USER}
|
||||
|
||||
result = await flow.async_step_import(import_config=conf)
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
|
||||
assert result["title"] == "67890fghij67"
|
||||
assert result["data"] == {
|
||||
CONF_API_KEY: "12345abcde12345abcde",
|
||||
CONF_APP_KEY: "67890fghij67890fghij",
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"get_devices_response",
|
||||
[mock_coro(return_value=json.loads(load_fixture("ambient_devices.json")))],
|
||||
|
||||
Reference in New Issue
Block a user