chiark / gitweb /
Make tests/play.py more reliable.
authorRichard Kettlewell <rjk@greenend.org.uk>
Thu, 10 Jan 2008 13:53:29 +0000 (13:53 +0000)
committerRichard Kettlewell <rjk@greenend.org.uk>
Thu, 10 Jan 2008 13:53:29 +0000 (13:53 +0000)
tests/play.py

index 3d09bd18c8ad0bbd84ea4db1cd36a916dabb6c06..c638572466943f31ae801d23857f320ee347af6d 100755 (executable)
@@ -27,6 +27,7 @@ def test():
     c = disorder.client()
     track = u"%s/Joe Bloggs/First Album/02:Second track.ogg" % dtest.tracks
     print " adding track to queue"
+    c.disable()
     c.play(track)
     print " checking track turned up in queue"
     q = c.queue()
@@ -36,6 +37,7 @@ def test():
     assert t['submitter'] == u'fred', "check queue submitter"
     i = t['id']
     print " waiting for track"
+    c.enable()
     p = c.playing()
     r = c.recent()
     while not((p is not None and p['id'] == i)