See #228: more performante federation import launch via API

This commit is contained in:
Eliot Berriot 2018-05-24 18:53:12 +02:00
parent 4f8db661fa
commit eded32c2e8
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
4 changed files with 25 additions and 7 deletions

View file

@ -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'