-from allmydata.util import iputil
+from allmydata.util import iputil, testutil
from twisted.trial import unittest
import re
DOTTED_QUAD_RE=re.compile("^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$")
-class ListAddresses(unittest.TestCase):
+class ListAddresses(testutil.SignalMixin, unittest.TestCase):
def test_get_local_ip_for(self):
addr = iputil.get_local_ip_for('127.0.0.1')
self.failUnless(DOTTED_QUAD_RE.match(addr))
from foolscap.eventual import flushEventualQueue
from allmydata import queen
+from allmydata.util import testutil
-class Basic(unittest.TestCase):
+class Basic(testutil.SignalMixin, unittest.TestCase):
def test_loadable(self):
q = queen.Queen()
d = q.startService()
from twisted.internet import defer, reactor
from twisted.application import service
from allmydata import client, queen, uri, download
-from allmydata.util import idlib, fileutil
+from allmydata.util import idlib, fileutil, testutil
from foolscap.eventual import flushEventualQueue
from twisted.python import log
from twisted.python.failure import Failure
d.addCallback(_done)
return d
-class SystemTest(unittest.TestCase):
+class SystemTest(testutil.SignalMixin, unittest.TestCase):
def setUp(self):
self.sparent = service.MultiService()
from twisted.internet import reactor
from twisted.trial import unittest
-class SignalMixin(unittest.TestCase):
+class SignalMixin:
# This class is necessary for any code which wants to use Processes
# outside the usual reactor.run() environment. It is copied from
# Twisted's twisted.test.test_process