@override_settings(SOUNDS_PATH=tempfile.mkdtemp())
def test_stereofy_failed(self, *args):
tmp_directory = self.pre_test()
FreesoundAudioProcessor(sound_id=Sound.objects.first().id, tmp_directory=tmp_directory).process()
// processing will fail because stereofy can"t work with generated random audio file or sterefy can"t be found
self.sound.refresh_from_db()
self.assertEqual(self.sound.processing_state, "FA")
self.assertEqual(self.sound.processing_ongoing_state, "FI")
After Change
@override_settings(SOUNDS_PATH=tempfile.mkdtemp())
def test_stereofy_failed(self, *args):
tmp_directory = self.pre_test()
result = FreesoundAudioProcessor(sound_id=Sound.objects.first().id, tmp_directory=tmp_directory).process()
// processing will fail because stereofy can"t work with generated random audio file or sterefy can"t be found
self.assertFalse(result) // Processing failed, retutned False
self.sound.refresh_from_db()
self.assertEqual(self.sound.processing_state, "FA")