mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-06 02:20:01 +02:00
Fixed #44: now bind track file to import job
This commit is contained in:
parent
a08bf51216
commit
e90e9dc7aa
14 changed files with 181 additions and 16 deletions
|
@ -39,3 +39,13 @@ def test_import_album_stores_release_group(db):
|
|||
|
||||
assert album.release_group_id == album_data['release-group']['id']
|
||||
assert album.artist == artist
|
||||
|
||||
|
||||
def test_import_job_is_bound_to_track_file(db, mocker):
|
||||
track = factories.TrackFactory()
|
||||
job = factories.ImportJobFactory(mbid=track.mbid)
|
||||
|
||||
mocker.patch('funkwhale_api.music.models.TrackFile.download_file')
|
||||
job.run()
|
||||
job.refresh_from_db()
|
||||
assert job.track_file.track == track
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue