core/tests/components/gdacs/conftest.py

33 lines
758 B
Python

"""Configuration for GDACS tests."""
import pytest
from homeassistant.components.gdacs import CONF_CATEGORIES, DOMAIN
from homeassistant.const import (
CONF_LATITUDE,
CONF_LONGITUDE,
CONF_RADIUS,
CONF_SCAN_INTERVAL,
CONF_UNIT_SYSTEM,
)
from tests.common import MockConfigEntry
@pytest.fixture
def config_entry() -> MockConfigEntry:
"""Create a mock GDACS config entry."""
return MockConfigEntry(
domain=DOMAIN,
data={
CONF_LATITUDE: -41.2,
CONF_LONGITUDE: 174.7,
CONF_RADIUS: 25,
CONF_UNIT_SYSTEM: "metric",
CONF_SCAN_INTERVAL: 300.0,
CONF_CATEGORIES: [],
},
title="-41.2, 174.7",
unique_id="-41.2, 174.7",
)