Remove CalendarEventDevice which was deprecated in 2022.5 (#77809)

This commit is contained in:
Allen Porter
2022-09-04 22:25:43 -07:00
committed by GitHub
parent 6044e2b054
commit ddf668d1cb
3 changed files with 7 additions and 146 deletions
-22
View File
@@ -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"