mirror of
https://github.com/home-assistant/core.git
synced 2026-09-28 02:18:10 -04:00
Update buienweather data before adding entities (#98455)
* Update buienweather data before adding entities * Fix tests
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
"""The tests for the Buienradar sensor platform."""
|
||||
from http import HTTPStatus
|
||||
|
||||
from homeassistant.components.buienradar.const import DOMAIN
|
||||
from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE
|
||||
from homeassistant.core import HomeAssistant
|
||||
@@ -18,6 +20,9 @@ async def test_smoke_test_setup_component(
|
||||
aioclient_mock: AiohttpClientMocker, hass: HomeAssistant
|
||||
) -> None:
|
||||
"""Smoke test for successfully set-up with default config."""
|
||||
aioclient_mock.get(
|
||||
"https://data.buienradar.nl/2.0/feed/json", status=HTTPStatus.NOT_FOUND
|
||||
)
|
||||
mock_entry = MockConfigEntry(domain=DOMAIN, unique_id="TEST_ID", data=TEST_CFG_DATA)
|
||||
|
||||
mock_entry.add_to_hass(hass)
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
"""The tests for the buienradar weather component."""
|
||||
from http import HTTPStatus
|
||||
|
||||
from homeassistant.components.buienradar.const import DOMAIN
|
||||
from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE
|
||||
from homeassistant.core import HomeAssistant
|
||||
@@ -13,6 +15,9 @@ async def test_smoke_test_setup_component(
|
||||
aioclient_mock: AiohttpClientMocker, hass: HomeAssistant
|
||||
) -> None:
|
||||
"""Smoke test for successfully set-up with default config."""
|
||||
aioclient_mock.get(
|
||||
"https://data.buienradar.nl/2.0/feed/json", status=HTTPStatus.NOT_FOUND
|
||||
)
|
||||
mock_entry = MockConfigEntry(domain=DOMAIN, unique_id="TEST_ID", data=TEST_CFG_DATA)
|
||||
|
||||
mock_entry.add_to_hass(hass)
|
||||
|
||||
Reference in New Issue
Block a user