mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 04:57:54 +00:00
Talk about os.stat and tracebacks instead of Nevow
This commit is contained in:
parent
2ba34a4759
commit
816ca79d8a
@ -4767,11 +4767,9 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
|
||||
def test_static_missing(self):
|
||||
# self.staticdir does not exist yet, because we used self.mktemp()
|
||||
d = self.assertFailure(self.GET("/static"), error.Error)
|
||||
# nevow.static throws an exception when it tries to os.stat the
|
||||
# missing directory, which gives the client a 500 Internal Server
|
||||
# Error, and the traceback reveals the parent directory name. By
|
||||
# switching to plain twisted.web.static, this gives a normal 404 that
|
||||
# doesn't reveal anything. This addresses #1720.
|
||||
# If os.stat raises an exception for the missing directory and the
|
||||
# traceback reveals the parent directory name we don't want to see
|
||||
# that parent directory name in the response. This addresses #1720.
|
||||
d.addCallback(lambda e: self.assertEquals(str(e), "404 Not Found"))
|
||||
return d
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user