From 4b068f6dd1c22a36ce9767b4934da60b3a3dc36c Mon Sep 17 00:00:00 2001 From: firstof9 Date: Mon, 13 Dec 2021 10:48:22 -0700 Subject: [PATCH] attempt to fix tests --- custom_components/nws_alerts/config_flow.py | 2 +- tests/test_config_flow.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/custom_components/nws_alerts/config_flow.py b/custom_components/nws_alerts/config_flow.py index 3c4a1eb..872c8cc 100644 --- a/custom_components/nws_alerts/config_flow.py +++ b/custom_components/nws_alerts/config_flow.py @@ -49,7 +49,7 @@ def _get_default(key): ) -async def _get_zone_list(self): +async def _get_zone_list(self) -> list | None: """Return list of zone by lat/lon""" data = None diff --git a/tests/test_config_flow.py b/tests/test_config_flow.py index a901eff..578b9e3 100644 --- a/tests/test_config_flow.py +++ b/tests/test_config_flow.py @@ -49,7 +49,9 @@ async def test_form( with patch( "custom_components.nws_alerts.async_setup_entry", return_value=True, - ) as mock_setup_entry: + ) as mock_setup_entry, patch( + "custom_components.nws_alerts.config_flow._get_zone_list", + return_value=None): result2 = await hass.config_entries.flow.async_configure( result["flow_id"], input