Seed the random function to make the test predictable

This commit is contained in:
Stein Magnus Jodal 2010-10-19 12:41:18 +02:00
parent 0d613418e6
commit 3a951ca948

View File

@ -1,3 +1,4 @@
import random
import unittest
from mopidy.backends.dummy import DummyBackend
@ -24,6 +25,7 @@ class IssueGH18RegressionTest(unittest.TestCase):
self.mpd = dispatcher.MpdDispatcher(backend=self.backend)
def test(self):
random.seed(1)
self.mpd.handle_request(u'play')
self.mpd.handle_request(u'random "1"')
self.mpd.handle_request(u'next')