Improve new Sonos snapshot/restore (#21509)

* Fine-tune new Sonos snapshot/restore

* Move into class
This commit is contained in:
Anders Melchiorsen authored and Paulus Schoutsen committed 2019-02-28 10:25:31 -08:00
1 parent b18b1cffff
commit 193cab4f62
2 files changed
+86 -63

No files matched your search

+2 -2
View File
@@ -328,7 +328,7 @@ class TestSonosMediaPlayer(unittest.TestCase):
snapshotMock.return_value = True
entity.soco.group = mock.MagicMock()
entity.soco.group.members = [e.soco for e in entities]
sonos.snapshot(entities, True)
sonos.SonosEntity.snapshot_multi(entities, True)
assert snapshotMock.call_count == 1
assert snapshotMock.call_args == mock.call()
@@ -350,6 +350,6 @@ class TestSonosMediaPlayer(unittest.TestCase):
entity._snapshot_group = mock.MagicMock()
entity._snapshot_group.members = [e.soco for e in entities]
entity._soco_snapshot = Snapshot(entity.soco)
sonos.restore(entities, True)
sonos.SonosEntity.restore_multi(entities, True)
assert restoreMock.call_count == 1
assert restoreMock.call_args == mock.call()