Add context to login flow (#15914)
* Add context to login flow * source -> context * Fix unit test * Update comment
This commit is contained in:
parent
45f12dd3c7
commit
50daef9a52
15 changed files with 36 additions and 38 deletions
|
@ -109,7 +109,8 @@ async def test_user_init_trumps_discovery(hass, flow_conf):
|
|||
assert result['type'] == data_entry_flow.RESULT_TYPE_FORM
|
||||
|
||||
# User starts flow
|
||||
result = await hass.config_entries.flow.async_init('test', data={})
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
'test', context={'source': config_entries.SOURCE_USER}, data={})
|
||||
assert result['type'] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
|
||||
|
||||
# Discovery flow has been aborted
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue