test_introducer_and_vdrive: remove the assumption that startService returns a Deferred

This commit is contained in:
Brian Warner 2007-05-23 17:37:20 -07:00
parent 83daa265ba
commit 2d21029367

View File

@ -1,6 +1,6 @@
from twisted.trial import unittest
from foolscap.eventual import flushEventualQueue
from foolscap.eventual import fireEventually, flushEventualQueue
from allmydata import introducer_and_vdrive
from allmydata.util import testutil
@ -8,7 +8,8 @@ from allmydata.util import testutil
class Basic(testutil.SignalMixin, unittest.TestCase):
def test_loadable(self):
q = introducer_and_vdrive.IntroducerAndVdrive()
d = q.startService()
d = fireEventually(None)
d.addCallback(lambda res: q.startService())
d.addCallback(lambda res: q.stopService())
d.addCallback(flushEventualQueue)
return d