Skip to content

Commit

Permalink
Do proper track lookup in test code
Browse files Browse the repository at this point in the history
  • Loading branch information
redshodan committed Dec 29, 2018
1 parent 195c94c commit 6874a44
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/tests/rest/testgetalbuminfo.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import pytest

from unsonic.views.rest import fillID
from unsonic.views.rest.getalbuminfo import GetAlbumInfo
from unsonic.views.rest.getalbuminfo2 import GetAlbumInfo2
from unsonic.models import Track
from . import buildCmd, checkResp


Expand All @@ -11,5 +13,7 @@ def album_info(request):


def testGetAlbumInfo(session, album_info):
cmd = buildCmd(session, album_info, {"id": "tr-1"})
row = session.query(Track).\
filter_by(title="Harder, Better, Faster, Stronger").one_or_none()
cmd = buildCmd(session, album_info, {"id": fillID(row)})
checkResp(cmd.req, cmd(), ok504=True)

0 comments on commit 6874a44

Please sign in to comment.