diff --git a/tests/components/gdacs/test_config_flow.py b/tests/components/gdacs/test_config_flow.py index f04f8158862..c3c5f5609c4 100644 --- a/tests/components/gdacs/test_config_flow.py +++ b/tests/components/gdacs/test_config_flow.py @@ -1,6 +1,9 @@ """Define tests for the GDACS config flow.""" from datetime import timedelta +from asynctest import patch +import pytest + from homeassistant import data_entry_flow from homeassistant.components.gdacs import CONF_CATEGORIES, DOMAIN from homeassistant.const import ( @@ -11,6 +14,13 @@ from homeassistant.const import ( ) +@pytest.fixture(name="gdacs_setup", autouse=True) +def gdacs_setup_fixture(): + """Mock gdacs entry setup.""" + with patch("homeassistant.components.gdacs.async_setup_entry", return_value=True): + yield + + async def test_duplicate_error(hass, config_entry): """Test that errors are shown when duplicates are added.""" conf = {CONF_LATITUDE: -41.2, CONF_LONGITUDE: 174.7, CONF_RADIUS: 25}