Skip to content

Commit

Permalink
Test bad sequence_id call
Browse files Browse the repository at this point in the history
  • Loading branch information
rgc99 committed Sep 30, 2021
1 parent fb0bf34 commit 9858d77
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1859,6 +1859,7 @@ async def test_service_adjust_time_sequence_bad(
await hass.async_block_till_done()
coordinator: IUCoordinator = hass.data[DOMAIN][COORDINATOR]

# Service call for sequence but targetting a zone entity
next_time = await begin_test(1, coordinator)
await hass.services.async_call(
DOMAIN,
Expand All @@ -1871,3 +1872,17 @@ async def test_service_adjust_time_sequence_bad(
True,
)
await finish_test(hass, coordinator, next_time, True)

# Service call for sequence with a bad sequence_id
next_time = await begin_test(1, coordinator)
await hass.services.async_call(
DOMAIN,
SERVICE_TIME_ADJUST,
{
"entity_id": "binary_sensor.irrigation_unlimited_c1_m",
"sequence_id": 999,
"reset": None,
},
True,
)
await finish_test(hass, coordinator, next_time, True)

0 comments on commit 9858d77

Please sign in to comment.