]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blobdiff - src/allmydata/test/test_iputil.py
Add Namespace utility class. (This is already used in the leasedb/cloud backend branch.)
[tahoe-lafs/tahoe-lafs.git] / src / allmydata / test / test_iputil.py
index 6a5b08f3cda329770f9a2847738e9028fcd5c690..71a8752accf6549001fb64f8258887948bdc4672 100644 (file)
@@ -5,11 +5,9 @@ from twisted.trial import unittest
 
 from allmydata.util import iputil
 import allmydata.test.common_util as testutil
+from allmydata.util.namespace import Namespace
 
 
-class Namespace:
-    pass
-
 DOTTED_QUAD_RE=re.compile("^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$")
 
 MOCK_IPADDR_OUTPUT = """\
@@ -130,6 +128,7 @@ class ListAddresses(testutil.SignalMixin, unittest.TestCase):
                 e.errno = errno.ENOENT
                 raise e
         self.patch(subprocess, 'Popen', call_Popen)
+        self.patch(os.path, 'isfile', lambda x: True)
 
         def call_get_local_ip_for(target):
             if target in ("localhost", "127.0.0.1"):