'Ensuring soco methods called for sonos_clear_sleep_timer service.'

@mock.patch('soco.SoCo', new=SoCoMock)
@mock.patch('socket.create_connection', side_effect=socket.error())
@mock.patch.object(SoCoMock, 'set_sleep_timer')
def test_sonos_clear_sleep_timer(self, set_sleep_timerMock, *args):

    sonos.setup_platform(self.hass, {}, mock.MagicMock(), {'host': '192.0.2.1'})
    device = self.hass.data[sonos.DATA_SONOS][(-1)]
    device.hass = self.hass
    device.set_sleep_timer(None)
    set_sleep_timerMock.assert_called_once_with(None)
