Set up Met during onboarding (#24622)

* Set up Met during onboarding

* Lint

* Add pyMetNo to test reqs
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2019-06-19 14:41:27 -07:00
1 parent 6ea92f86a5
commit f2962a0d16
12 files changed
+242 -54

No files matched your search

+16
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,
}