Skip to content

Commit

Permalink
mock the get_zone_list
Browse files Browse the repository at this point in the history
  • Loading branch information
firstof9 committed Dec 13, 2021
1 parent 4b068f6 commit 4d58d08
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions tests/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,16 @@ async def test_form(
):
"""Test we get the form."""
await setup.async_setup_component(hass, "persistent_notification", {})
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
)
assert result["type"] == "form"
assert result["errors"] == {}
# assert result["title"] == title_1
with patch(
"custom_components.nws_alerts.config_flow._get_zone_list",
return_value=None):

result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
)
assert result["type"] == "form"
assert result["errors"] == {}
# assert result["title"] == title_1

with patch(
"custom_components.nws_alerts.async_setup_entry",
Expand Down

0 comments on commit 4d58d08

Please sign in to comment.