import os import unittest from src.video_manager import VideoManager class VideoManagerTest(unittest.TestCase): def setUp(self): self.file_manager = VideoManager() self.dir = "" def test_download_youtube_audio(self): youtube_link = "" filename = f"{self.dir}/audio.mp4" self.file_manager.download_youtube_audio(youtube_link, filename) self.assertTrue(os.path.exists(filename)) os.remove(filename) def test_convert_to_wav(self): mp4_file = "" wav_file = mp4_file.replace(".mp4", ".wav") self.file_manager.convert_to_wav(mp4_file, wav_file) self.assertTrue(os.path.exists(wav_file)) os.remove(wav_file) def test_load_local_file(self): local_file_path = "" result_path = self.file_manager.load_local_file(local_file_path) self.assertEqual(result_path, local_file_path.replace(".mp4", ".wav")) if __name__ == "__main__": unittest.main()