hass-core/tests/components/buienradar/test_weather.py
Paulus Schoutsen 276f3afb00
Do async_setup_platform in background (#36244)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-31 22:18:30 -07:00

25 lines
732 B
Python

"""The tests for the buienradar weather component."""
from homeassistant.components import weather
from homeassistant.setup import async_setup_component
# Example config snippet from documentation.
BASE_CONFIG = {
"weather": [
{
"platform": "buienradar",
"name": "volkel",
"latitude": 51.65,
"longitude": 5.7,
"forecast": True,
}
]
}
async def test_smoke_test_setup_component(hass):
"""Smoke test for successfully set-up with default config."""
assert await async_setup_component(hass, weather.DOMAIN, BASE_CONFIG)
await hass.async_block_till_done()
state = hass.states.get("weather.volkel")
assert state.state == "unknown"