Commit cab28a47 authored by petitminion's avatar petitminion
Browse files

Merge branch 'playlist' of https://dev.funkwhale.audio/petitminion/funkwhale into playlist

parents 2830134a c5d8470a
Pipeline #16341 failed with stages
in 33 seconds
import os
from funkwhale_api.playlists import utils
def test_get_track_id_from_xspf(factories, tmp_path):
track1 = factories["music.Track"]()
track2 = factories["music.Track"]()
tracks_ids = [track1.id, track2.id]
xspf_content = utils.generate_xspf_from_tracks_ids(tracks_ids)
f = open("test.xspf", "w")
f.write(xspf_content)
f.close()
xspf_file = "test.xspf"
expected = [track1.id, track2.id]
assert utils.get_track_id_from_xspf(xspf_file) == expected
os.remove("test.xspf")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment