X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/71b70599a2cd81c13cc4326499a5d0c45358cd7d..af371dd1ec7524cc170180e7be4f272d7b536020:/tests/play.py diff --git a/tests/play.py b/tests/play.py index 92bb664..3d09bd1 100755 --- a/tests/play.py +++ b/tests/play.py @@ -23,9 +23,10 @@ import dtest,time,disorder,re def test(): """Play some tracks""" dtest.start_daemon() + dtest.create_user() c = disorder.client() track = u"%s/Joe Bloggs/First Album/02:Second track.ogg" % dtest.tracks - print "adding track to queue" + print " adding track to queue" c.play(track) print " checking track turned up in queue" q = c.queue() @@ -70,6 +71,16 @@ def test(): time.sleep(1) p = c.playing() assert p is None, "checking nothing is playing" + c.random_disable() + assert c.random_enabled() == False + assert c.enabled() == False + c.enable() + assert c.enabled() == True + time.sleep(1) + p = c.playing() + assert p is None, "checking nothing playing when random disabled but playing enabled" + c.random_enable() + assert c.random_enabled() == True if __name__ == '__main__': dtest.run()