def test_rsync(self):
        with patch.dict(rsync.__salt__, {'config.option':
                                         MagicMock(return_value=False)}):
            self.assertRaises(SaltInvocationError, rsync.rsync, '', '')

        with patch.dict(rsync.__salt__,
                        {'config.option': MagicMock(return_value='A'),
                         'cmd.run_all': MagicMock(side_effect=[IOError('f'),
                                                               'A'])}):
            with patch.object(rsync, '_check', return_value=['A']):
                self.assertRaises(CommandExecutionError, rsync.rsync, 'a', 'b')

                self.assertEqual(rsync.rsync('src', 'dst'), 'A')
Returns the duration of a given sound file.
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/rsync_test.py/RsyncTestCase.test_rsync--crossover with--dataset/ETHPy150Open Agerrr/Automated_Music_Transcription/first_peaks_method.py/getDuration