tahoe-lafs/src/allmydata/test/test_iputil.py

15 lines
469 B
Python
Raw Normal View History

from twisted.trial import unittest
from allmydata.util import iputil
class ListAddresses(unittest.TestCase):
def test_list_async(self):
d = iputil.get_local_addresses_async()
def _check(addresses):
self.failUnless(len(addresses) >= 1) # always have localhost
2007-04-16 22:05:25 +00:00
self.failUnless("127.0.0.1" in addresses,
"didn't see 127.0.0.1 in %s" % (addresses,))
d.addCallbacks(_check)
return d