Use pysonos for Sonos media player (#16753)
This commit is contained in:
parent
092c146eae
commit
78b6439ee6
7 changed files with 67 additions and 67 deletions
|
@ -12,7 +12,7 @@ async def test_creating_entry_sets_up_media_player(hass):
|
|||
"""Test setting up Sonos loads the media player."""
|
||||
with patch('homeassistant.components.media_player.sonos.async_setup_entry',
|
||||
return_value=mock_coro(True)) as mock_setup, \
|
||||
patch('soco.discover', return_value=True):
|
||||
patch('pysonos.discover', return_value=True):
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
sonos.DOMAIN, context={'source': config_entries.SOURCE_USER})
|
||||
assert result['type'] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
|
||||
|
@ -26,7 +26,7 @@ async def test_configuring_sonos_creates_entry(hass):
|
|||
"""Test that specifying config will create an entry."""
|
||||
with patch('homeassistant.components.sonos.async_setup_entry',
|
||||
return_value=mock_coro(True)) as mock_setup, \
|
||||
patch('soco.discover', return_value=True):
|
||||
patch('pysonos.discover', return_value=True):
|
||||
await async_setup_component(hass, sonos.DOMAIN, {
|
||||
'sonos': {
|
||||
'some_config': 'to_trigger_import'
|
||||
|
@ -41,7 +41,7 @@ async def test_not_configuring_sonos_not_creates_entry(hass):
|
|||
"""Test that no config will not create an entry."""
|
||||
with patch('homeassistant.components.sonos.async_setup_entry',
|
||||
return_value=mock_coro(True)) as mock_setup, \
|
||||
patch('soco.discover', return_value=True):
|
||||
patch('pysonos.discover', return_value=True):
|
||||
await async_setup_component(hass, sonos.DOMAIN, {})
|
||||
await hass.async_block_till_done()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue