Set up Met during onboarding (#24622)
* Set up Met during onboarding * Lint * Add pyMetNo to test reqs
This commit is contained in:
parent
6ea92f86a5
commit
f2962a0d16
12 changed files with 242 additions and 54 deletions
|
@ -131,3 +131,19 @@ async def test_flow_entry_config_entry_already_exists():
|
|||
assert len(config_form.mock_calls) == 1
|
||||
assert len(config_entries.mock_calls) == 1
|
||||
assert len(flow._errors) == 1
|
||||
|
||||
|
||||
async def test_onboarding_step(hass, mock_weather):
|
||||
"""Test initializing via onboarding step."""
|
||||
hass = Mock()
|
||||
|
||||
flow = config_flow.MetFlowHandler()
|
||||
flow.hass = hass
|
||||
|
||||
result = await flow.async_step_onboarding({})
|
||||
|
||||
assert result['type'] == 'create_entry'
|
||||
assert result['title'] == 'Home'
|
||||
assert result['data'] == {
|
||||
'track_home': True,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue