mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-03 15:29:17 +02:00
See #228: more performante federation import launch via API
This commit is contained in:
parent
4f8db661fa
commit
eded32c2e8
4 changed files with 25 additions and 7 deletions
|
@ -47,6 +47,15 @@ def test_set_acoustid_on_track_file_required_high_score(factories, mocker):
|
|||
assert track_file.acoustid_track_id is None
|
||||
|
||||
|
||||
def test_import_batch_run(factories, mocker):
|
||||
job = factories['music.ImportJob']()
|
||||
mocked_job_run = mocker.patch(
|
||||
'funkwhale_api.music.tasks.import_job_run.delay')
|
||||
tasks.import_batch_run(import_batch_id=job.batch.pk)
|
||||
|
||||
mocked_job_run.assert_called_once_with(import_job_id=job.pk)
|
||||
|
||||
|
||||
def test_import_job_can_run_with_file_and_acoustid(
|
||||
artists, albums, tracks, preferences, factories, mocker):
|
||||
preferences['providers_acoustid__api_key'] = 'test'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue