mirror of
https://github.com/home-assistant/core.git
synced 2025-12-27 14:31:13 +00:00
Add stop for demo players (#50485)
This commit is contained in:
@@ -400,6 +400,26 @@ async def test_seek(hass, mock_media_seek):
|
||||
assert mock_media_seek.called
|
||||
|
||||
|
||||
async def test_stop(hass):
|
||||
"""Test stop."""
|
||||
assert await async_setup_component(
|
||||
hass, mp.DOMAIN, {"media_player": {"platform": "demo"}}
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
state = hass.states.get(TEST_ENTITY_ID)
|
||||
assert state.state == STATE_PLAYING
|
||||
|
||||
await hass.services.async_call(
|
||||
mp.DOMAIN,
|
||||
mp.SERVICE_MEDIA_STOP,
|
||||
{ATTR_ENTITY_ID: TEST_ENTITY_ID},
|
||||
blocking=True,
|
||||
)
|
||||
state = hass.states.get(TEST_ENTITY_ID)
|
||||
assert state.state == STATE_OFF
|
||||
|
||||
|
||||
async def test_media_image_proxy(hass, hass_client):
|
||||
"""Test the media server image proxy server ."""
|
||||
assert await async_setup_component(
|
||||
|
||||
Reference in New Issue
Block a user