Initial commit that merge both the front end and the API in the same repository
This commit is contained in:
commit
76f98b74dd
285 changed files with 51318 additions and 0 deletions
0
api/funkwhale_api/downloader/tests/__init__.py
Normal file
0
api/funkwhale_api/downloader/tests/__init__.py
Normal file
14
api/funkwhale_api/downloader/tests/test_downloader.py
Normal file
14
api/funkwhale_api/downloader/tests/test_downloader.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import os
|
||||
from test_plus.test import TestCase
|
||||
from .. import downloader
|
||||
from funkwhale_api.utils.tests import TMPDirTestCaseMixin
|
||||
|
||||
|
||||
class TestDownloader(TMPDirTestCaseMixin, TestCase):
|
||||
|
||||
def test_can_download_audio_from_youtube_url_to_vorbis(self):
|
||||
data = downloader.download('https://www.youtube.com/watch?v=tPEE9ZwTmy0', target_directory=self.download_dir)
|
||||
self.assertEqual(
|
||||
data['audio_file_path'],
|
||||
os.path.join(self.download_dir, 'tPEE9ZwTmy0.ogg'))
|
||||
self.assertTrue(os.path.exists(data['audio_file_path']))
|
||||
Loading…
Add table
Add a link
Reference in a new issue