Patch gdacs entry setup in config flow tests (#33776)
parent
643848cac4
commit
cb98d62968
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue