1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Add missing timeout to command_line platforms: cover, notify, switch (#38497)

* Add missing timeout to command_line platforms: cover, notify, switch

* add timeout test for notify
This commit is contained in:
J. Nick Koston
2020-08-04 17:00:02 -10:00
committed by GitHub
parent dddcb8e299
commit 7b728b17f7
11 changed files with 132 additions and 67 deletions

View File

@@ -180,13 +180,14 @@ class TestCommandSwitch(unittest.TestCase):
"echo 'off command'",
None,
None,
15,
]
no_state_device = command_line.CommandSwitch(*init_args)
assert no_state_device.assumed_state
# Set state command
init_args[-2] = "cat {}"
init_args[-3] = "cat {}"
state_device = command_line.CommandSwitch(*init_args)
assert not state_device.assumed_state
@@ -201,6 +202,7 @@ class TestCommandSwitch(unittest.TestCase):
"echo 'off command'",
False,
None,
15,
]
test_switch = command_line.CommandSwitch(*init_args)