See #297: removed a lot of unused variables
This commit is contained in:
parent
9bea804f14
commit
799386c2b6
28 changed files with 77 additions and 97 deletions
|
|
@ -45,8 +45,8 @@ def test_set_acoustid_on_track_file(factories, mocker, preferences):
|
|||
def test_set_acoustid_on_track_file_required_high_score(factories, mocker):
|
||||
track_file = factories["music.TrackFile"](acoustid_track_id=None)
|
||||
payload = {"results": [{"score": 0.79}], "status": "ok"}
|
||||
m = mocker.patch("acoustid.match", return_value=payload)
|
||||
r = tasks.set_acoustid_on_track_file(track_file_id=track_file.pk)
|
||||
mocker.patch("acoustid.match", return_value=payload)
|
||||
tasks.set_acoustid_on_track_file(track_file_id=track_file.pk)
|
||||
track_file.refresh_from_db()
|
||||
|
||||
assert track_file.acoustid_track_id is None
|
||||
|
|
@ -170,7 +170,7 @@ def test_import_job_skip_if_already_exists(artists, albums, tracks, factories, m
|
|||
def test_import_job_can_be_errored(factories, mocker, preferences):
|
||||
path = os.path.join(DATA_DIR, "test.ogg")
|
||||
mbid = "9968a9d6-8d92-4051-8f76-674e157b6eed"
|
||||
track_file = factories["music.TrackFile"](track__mbid=mbid)
|
||||
factories["music.TrackFile"](track__mbid=mbid)
|
||||
|
||||
class MyException(Exception):
|
||||
pass
|
||||
|
|
@ -226,7 +226,7 @@ def test_update_album_cover_file_data(factories, mocker):
|
|||
return_value={"hello": "world"},
|
||||
)
|
||||
tasks.update_album_cover(album=album, track_file=tf)
|
||||
md = data = tf.get_metadata()
|
||||
tf.get_metadata()
|
||||
mocked_get.assert_called_once_with(data={"hello": "world"})
|
||||
|
||||
|
||||
|
|
@ -242,7 +242,7 @@ def test_update_album_cover_file_cover_separate_file(ext, mimetype, factories, m
|
|||
mocked_get = mocker.patch("funkwhale_api.music.models.Album.get_image")
|
||||
mocker.patch("funkwhale_api.music.metadata.Metadata.get_picture", return_value=None)
|
||||
tasks.update_album_cover(album=album, track_file=tf)
|
||||
md = data = tf.get_metadata()
|
||||
tf.get_metadata()
|
||||
mocked_get.assert_called_once_with(
|
||||
data={"mimetype": mimetype, "content": image_content}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue