Sonos improvements (#3997)
* Sonos improvements: media_* properties delegate to coordinator if speaker is a slave, media_image_url and media_title now works for radio streams, source selection/list takes speaker model into account, commands on slaves delegate to coordinator. * Fixed failing unit tests.
This commit is contained in:
1 parent
79da1ec0d9
commit
961c02f72a
2 files changed
+182
-58
No files matched your search
Regular → Executable
+11
@@ -19,6 +19,16 @@ class socoDiscoverMock():
|
||||
return {SoCoMock('192.0.2.1')}
|
||||
|
||||
|
||||
class AvTransportMock():
|
||||
"""Mock class for the avTransport property on soco.SoCo object."""
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def GetMediaInfo(self, _):
|
||||
return {'CurrentURI': '',
|
||||
'CurrentURIMetaData': ''}
|
||||
|
||||
|
||||
class SoCoMock():
|
||||
"""Mock class for the soco.SoCo object."""
|
||||
|
||||
@@ -26,6 +36,7 @@ class SoCoMock():
|
||||
"""Initialize soco object."""
|
||||
self.ip_address = ip
|
||||
self.is_visible = True
|
||||
self.avTransport = AvTransportMock()
|
||||
|
||||
def get_speaker_info(self):
|
||||
"""Return a dict with various data points about the speaker."""
|
||||
|
||||
Reference in new issue
Block a user