Also test if command can be send successfully in Husqvarna Automower (#120107)

pull/120106/head
Thomas55555 2024-06-21 17:02:20 +02:00 committed by GitHub
parent c342c1e4d6
commit 710e245819
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 0 deletions

View File

@ -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")