mirror of
https://github.com/home-assistant/core.git
synced 2025-06-24 06:57:08 +00:00

* initial * trans key correction * base class updates * model tidy up * Update homeassistant/components/squeezebox/strings.json Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/squeezebox/entity.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/squeezebox/media_player.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/squeezebox/media_player.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/squeezebox/button.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * review updates * update * move manufacturer to library * updates * list concat * review updates * Update tests/components/squeezebox/test_button.py --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
24 lines
686 B
Python
24 lines
686 B
Python
"""Tests for the squeezebox button component."""
|
|
|
|
from unittest.mock import MagicMock
|
|
|
|
from homeassistant.components.button import DOMAIN as BUTTON_DOMAIN, SERVICE_PRESS
|
|
from homeassistant.const import ATTR_ENTITY_ID
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
|
|
async def test_squeezebox_press(
|
|
hass: HomeAssistant, configured_player_with_button: MagicMock
|
|
) -> None:
|
|
"""Test press service call."""
|
|
await hass.services.async_call(
|
|
BUTTON_DOMAIN,
|
|
SERVICE_PRESS,
|
|
{ATTR_ENTITY_ID: "button.test_player_preset_1"},
|
|
blocking=True,
|
|
)
|
|
|
|
configured_player_with_button.async_query.assert_called_with(
|
|
"button", "preset_1.single"
|
|
)
|