Set up Met during onboarding (#24622)

* Set up Met during onboarding

* Lint

* Add pyMetNo to test reqs
This commit is contained in:
Paulus Schoutsen 2019-06-19 14:41:27 -07:00 committed by GitHub
parent 6ea92f86a5
commit f2962a0d16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 242 additions and 54 deletions

View file

@ -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,
}