mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-06 03:09:55 +02:00
Now store source AP track file on track_file
This commit is contained in:
parent
04d710e690
commit
8db832f03b
11 changed files with 167 additions and 182 deletions
|
@ -62,6 +62,7 @@ def test_import_job_from_federation_no_musicbrainz(factories):
|
|||
|
||||
tf = job.track_file
|
||||
assert tf.source == job.source
|
||||
assert tf.federation_source == job.federation_source
|
||||
assert tf.track.title == 'Ping'
|
||||
assert tf.track.artist.name == 'Hello'
|
||||
assert tf.track.album.title == 'World'
|
||||
|
@ -84,6 +85,7 @@ def test_import_job_from_federation_musicbrainz_recording(factories, mocker):
|
|||
|
||||
tf = job.track_file
|
||||
assert tf.source == job.source
|
||||
assert tf.federation_source == job.federation_source
|
||||
assert tf.track == t
|
||||
track_from_api.assert_called_once_with(
|
||||
mbid=tasks.get_mbid(job.metadata['recording'], 'recording'))
|
||||
|
@ -105,6 +107,7 @@ def test_import_job_from_federation_musicbrainz_release(factories, mocker):
|
|||
job.refresh_from_db()
|
||||
|
||||
tf = job.track_file
|
||||
assert tf.federation_source == job.federation_source
|
||||
assert tf.source == job.source
|
||||
assert tf.track.title == 'Ping'
|
||||
assert tf.track.artist == a.artist
|
||||
|
@ -131,6 +134,7 @@ def test_import_job_from_federation_musicbrainz_artist(factories, mocker):
|
|||
|
||||
tf = job.track_file
|
||||
assert tf.source == job.source
|
||||
assert tf.federation_source == job.federation_source
|
||||
assert tf.track.title == 'Ping'
|
||||
assert tf.track.artist == a
|
||||
assert tf.track.album.artist == a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue