Add confirmation to Cast/Sonos/iOS config entries (#16769)

* Add confirmation to Cast/Sonos/iOS config entries

* Remove redundant code
This commit is contained in:
Paulus Schoutsen authored and Pascal Vizeli committed 2018-09-21 16:34:37 +02:00
1 parent 213171769d
commit 8b42d0c471
5 files changed
+59 -33

No files matched your search

+6
View File
@@ -15,6 +15,12 @@ async def test_creating_entry_sets_up_media_player(hass):
patch('pysonos.discover', return_value=True):
result = await hass.config_entries.flow.async_init(
sonos.DOMAIN, context={'source': config_entries.SOURCE_USER})
# Confirmation form
assert result['type'] == data_entry_flow.RESULT_TYPE_FORM
result = await hass.config_entries.flow.async_configure(
result['flow_id'], {})
assert result['type'] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
await hass.async_block_till_done()