'Ensuring soco methods called for sonos_snapshot service.'

@mock.patch('soco.SoCo', new=SoCoMock)
@mock.patch('socket.create_connection', side_effect=socket.error())
@mock.patch.object(soco.snapshot.Snapshot, 'snapshot')
def test_sonos_snapshot(self, snapshotMock, *args):

    sonos.setup_platform(self.hass, {}, fake_add_device, {'host': '192.0.2.1'})
    device = self.hass.data[sonos.DATA_SONOS][(-1)]
    device.hass = self.hass
    snapshotMock.return_value = True
    device.snapshot()
    self.assertEqual(snapshotMock.call_count, 1)
    self.assertEqual(snapshotMock.call_args, mock.call())
