From: Brian Warner Date: Thu, 24 May 2007 00:37:20 +0000 (-0700) Subject: test_introducer_and_vdrive: remove the assumption that startService returns a Deferred X-Git-Tag: allmydata-tahoe-0.3.0~59 X-Git-Url: https://git.rkrishnan.org/pf/index.php?a=commitdiff_plain;h=2d210293677fc9de01e23f50a0dda5b6853a223c;p=tahoe-lafs%2Ftahoe-lafs.git test_introducer_and_vdrive: remove the assumption that startService returns a Deferred --- diff --git a/src/allmydata/test/test_introducer_and_vdrive.py b/src/allmydata/test/test_introducer_and_vdrive.py index 31338a79..c85d20ae 100644 --- a/src/allmydata/test/test_introducer_and_vdrive.py +++ b/src/allmydata/test/test_introducer_and_vdrive.py @@ -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