See #272: updated API to return upload data on tracks
This commit is contained in:
parent
8489c79c89
commit
d3f8fb6cb0
16 changed files with 97 additions and 142 deletions
|
|
@ -150,10 +150,6 @@ def test_playlist_playable_by_anonymous(privacy_level, expected, factories):
|
|||
factories["music.Upload"](
|
||||
track=track, library__privacy_level=privacy_level, import_status="finished"
|
||||
)
|
||||
queryset = playlist.__class__.objects.playable_by(None).annotate_playable_by_actor(
|
||||
None
|
||||
)
|
||||
queryset = playlist.__class__.objects.playable_by(None).with_playable_plts(None)
|
||||
match = playlist in list(queryset)
|
||||
assert match is expected
|
||||
if expected:
|
||||
assert bool(queryset.first().is_playable_by_actor) is expected
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ def test_can_list_tracks_from_playlist(level, factories, logged_in_api_client):
|
|||
url = reverse("api:v1:playlists-tracks", kwargs={"pk": plt.playlist.pk})
|
||||
response = logged_in_api_client.get(url)
|
||||
serialized_plt = serializers.PlaylistTrackSerializer(plt).data
|
||||
serialized_plt["track"]["is_playable"] = False
|
||||
|
||||
assert response.data["count"] == 1
|
||||
assert response.data["results"][0] == serialized_plt
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue