From: Daira Hopwood Date: Tue, 25 Jun 2013 18:50:52 +0000 (+0100) Subject: test_iputil.py: use more realistic error for 'command not found' in mock. X-Git-Tag: allmydata-tahoe-1.10.1a1~231 X-Git-Url: https://git.rkrishnan.org/pf/content/simplejson/frontends/%3C?a=commitdiff_plain;h=16b245563db2f6ca71b9332b06debbe3e1d734b4;p=tahoe-lafs%2Ftahoe-lafs.git test_iputil.py: use more realistic error for 'command not found' in mock. Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/test/test_iputil.py b/src/allmydata/test/test_iputil.py index fcb10178..00359a42 100644 --- a/src/allmydata/test/test_iputil.py +++ b/src/allmydata/test/test_iputil.py @@ -99,8 +99,8 @@ class ListAddresses(testutil.SignalMixin, unittest.TestCase): elif os.path.basename(args[0]) == command: return FakeProcess(output, "") else: - e = OSError("not found") - e.errno = errno.EEXIST + e = OSError("[Errno 2] No such file or directory") + e.errno = errno.ENOENT raise e self.patch(subprocess, 'Popen', call_Popen)