From 921e4c7c300956063938cc263c952eab2b8ed0dc Mon Sep 17 00:00:00 2001 From: spl0k Date: Thu, 22 Mar 2018 19:18:28 +0100 Subject: [PATCH] Fixed playlists tests --- tests/api/test_playlist.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/api/test_playlist.py b/tests/api/test_playlist.py index 9d184bd..0e9b063 100644 --- a/tests/api/test_playlist.py +++ b/tests/api/test_playlist.py @@ -94,12 +94,13 @@ class PlaylistTestCase(ApiTestBase): # other's private from non admin with db_session: - playlist = Playlist.get(lambda p: not p.public == False and p.user.name == 'alice') + playlist = Playlist.get(lambda p: not p.public and p.user.name == 'alice') self._make_request('getPlaylist', { 'u': 'bob', 'p': 'B0b', 'id': str(playlist.id) }, error = 50) # standard rv, child = self._make_request('getPlaylists', tag = 'playlists') - rv, child = self._make_request('getPlaylist', { 'id': child[0].get('id') }, tag = 'playlist') + self._make_request('getPlaylist', { 'id': child[0].get('id') }, tag = 'playlist') + rv, child = self._make_request('getPlaylist', { 'id': child[1].get('id') }, tag = 'playlist') self.assertEqual(child.get('songCount'), '2') self.assertEqual(self._xpath(child, 'count(./entry)'), 2) # don't count children, there may be 'allowedUser's (even though not supported by supysonic) self.assertEqual(child.get('duration'), '4')