Merge branch '565-failing-tests' into 'develop'

See #565: fixed path issues with external storage

Closes #565

See merge request funkwhale/funkwhale!736
This commit is contained in:
Eliot Berriot 2019-04-24 15:29:57 +02:00
commit 430af5560c
8 changed files with 39 additions and 13 deletions

View file

@ -706,7 +706,7 @@ def test_activity_pub_track_serializer_from_ap(factories, r_mock, mocker):
assert album.from_activity == activity
assert album.cover.read() == b"coucou"
assert album.cover.path.endswith(".png")
assert album.cover_path.endswith(".png")
assert album.title == data["album"]["name"]
assert album.fid == data["album"]["id"]
assert str(album.mbid) == data["album"]["musicbrainzId"]

View file

@ -26,10 +26,10 @@ def test_clean_federation_music_cache_if_no_listen(preferences, factories):
# local upload, should not be cleaned
upload4 = factories["music.Upload"](library__actor__local=True, accessed_date=None)
path1 = upload1.audio_file.path
path2 = upload2.audio_file.path
path3 = upload3.audio_file.path
path4 = upload4.audio_file.path
path1 = upload1.audio_file_path
path2 = upload2.audio_file_path
path3 = upload3.audio_file_path
path4 = upload4.audio_file_path
tasks.clean_music_cache()
@ -66,7 +66,7 @@ def test_clean_federation_music_cache_orphaned(settings, preferences, factories)
upload.refresh_from_db()
assert bool(upload.audio_file) is True
assert os.path.exists(upload.audio_file.path) is True
assert os.path.exists(upload.audio_file_path) is True
assert os.path.exists(remove_path) is False