From 3c5adfb8c4dd215a52dae923bb8b4edf8f373b15 Mon Sep 17 00:00:00 2001 From: rgc99 Date: Tue, 17 Oct 2023 20:48:01 +0000 Subject: [PATCH] Add test --- tests/configs/service_manual_run_queue.yaml | 14 ++++++++++++++ tests/test_manual_run.py | 10 ++++++++++ 2 files changed, 24 insertions(+) diff --git a/tests/configs/service_manual_run_queue.yaml b/tests/configs/service_manual_run_queue.yaml index 64b51ca..22ec8d9 100644 --- a/tests/configs/service_manual_run_queue.yaml +++ b/tests/configs/service_manual_run_queue.yaml @@ -109,3 +109,17 @@ irrigation_unlimited: - {t: '2023-10-04 06:37:06', c: 1, z: 1, s: 1} - {t: '2023-10-04 06:47:06', c: 1, z: 1, s: 0} - {t: '2023-10-04 06:47:06', c: 1, z: 0, s: 0} + - name: '4-Manual run all zones' + start: '2023-10-04 06:00' + end: '2023-10-04 07:00' + results: + - {t: '2023-10-04 06:00:01', c: 1, z: 0, s: 1} + - {t: '2023-10-04 06:00:01', c: 1, z: 1, s: 1} + - {t: '2023-10-04 06:10:01', c: 1, z: 1, s: 0} + - {t: '2023-10-04 06:10:01', c: 1, z: 2, s: 1} + - {t: '2023-10-04 06:20:01', c: 1, z: 2, s: 0} + - {t: '2023-10-04 06:20:01', c: 1, z: 3, s: 1} + - {t: '2023-10-04 06:30:01', c: 1, z: 3, s: 0} + - {t: '2023-10-04 06:30:01', c: 1, z: 4, s: 1} + - {t: '2023-10-04 06:40:01', c: 1, z: 4, s: 0} + - {t: '2023-10-04 06:40:01', c: 1, z: 0, s: 0} diff --git a/tests/test_manual_run.py b/tests/test_manual_run.py index 1011f7f..0fbd01d 100644 --- a/tests/test_manual_run.py +++ b/tests/test_manual_run.py @@ -406,4 +406,14 @@ async def test_service_manual_run_queue( ) await exam.finish_test() + await exam.begin_test(4) + await exam.call( + SERVICE_MANUAL_RUN, + { + "entity_id": "binary_sensor.irrigation_unlimited_c1_m", + "time": "00:10", + }, + ) + await exam.finish_test() + exam.check_summary()