Also test if command can be send successfully in Husqvarna Automower (#120107)
parent
c342c1e4d6
commit
710e245819
|
@ -70,6 +70,15 @@ async def test_lawn_mower_commands(
|
|||
) -> None:
|
||||
"""Test lawn_mower commands."""
|
||||
await setup_integration(hass, mock_config_entry)
|
||||
await hass.services.async_call(
|
||||
domain="lawn_mower",
|
||||
service=service,
|
||||
service_data={"entity_id": "lawn_mower.test_mower_1"},
|
||||
blocking=True,
|
||||
)
|
||||
mocked_method = getattr(mock_automower_client.commands, aioautomower_command)
|
||||
mocked_method.assert_called_once_with(TEST_MOWER_ID)
|
||||
|
||||
getattr(
|
||||
mock_automower_client.commands, aioautomower_command
|
||||
).side_effect = ApiException("Test error")
|
||||
|
|
Loading…
Reference in New Issue