mirror of
https://github.com/home-assistant/core.git
synced 2026-11-22 13:46:27 -04:00
Remove CalendarEventDevice which was deprecated in 2022.5 (#77809)
This commit is contained in:
@@ -66,26 +66,4 @@ async def test_calendars_http_api(hass, hass_client):
|
||||
assert data == [
|
||||
{"entity_id": "calendar.calendar_1", "name": "Calendar 1"},
|
||||
{"entity_id": "calendar.calendar_2", "name": "Calendar 2"},
|
||||
{"entity_id": "calendar.calendar_3", "name": "Calendar 3"},
|
||||
]
|
||||
|
||||
|
||||
async def test_events_http_api_shim(hass, hass_client):
|
||||
"""Test the legacy shim 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_3")
|
||||
assert response.status == HTTPStatus.BAD_REQUEST
|
||||
start = dt_util.now()
|
||||
end = start + timedelta(days=1)
|
||||
response = await client.get(
|
||||
"/api/calendars/calendar.calendar_1?start={}&end={}".format(
|
||||
start.isoformat(), end.isoformat()
|
||||
)
|
||||
)
|
||||
assert response.status == HTTPStatus.OK
|
||||
events = await response.json()
|
||||
assert events[0]["summary"] == "Future Event"
|
||||
assert events[0]["description"] == "Future Description"
|
||||
assert events[0]["location"] == "Future Location"
|
||||
|
||||
Reference in New Issue
Block a user