mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Do async_setup_platform in background (#36244)
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
@@ -8,6 +8,7 @@ import homeassistant.util.dt as dt_util
|
||||
async def test_events_http_api(hass, hass_client):
|
||||
"""Test the calendar demo view."""
|
||||
await async_setup_component(hass, "calendar", {"calendar": {"platform": "demo"}})
|
||||
await hass.async_block_till_done()
|
||||
client = await hass_client()
|
||||
response = await client.get("/api/calendars/calendar.calendar_2")
|
||||
assert response.status == 400
|
||||
@@ -27,6 +28,7 @@ async def test_events_http_api(hass, hass_client):
|
||||
async def test_calendars_http_api(hass, hass_client):
|
||||
"""Test the calendar demo view."""
|
||||
await async_setup_component(hass, "calendar", {"calendar": {"platform": "demo"}})
|
||||
await hass.async_block_till_done()
|
||||
client = await hass_client()
|
||||
response = await client.get("/api/calendars")
|
||||
assert response.status == 200
|
||||
|
||||
Reference in New Issue
Block a user