diff options
Diffstat (limited to 'test/test_sendfile.py')
-rwxr-xr-x | test/test_sendfile.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_sendfile.py b/test/test_sendfile.py index 3de6c50..6872e4d 100755 --- a/test/test_sendfile.py +++ b/test/test_sendfile.py @@ -55,6 +55,11 @@ class TestSendFile(unittest.TestCase): self.assertEqual(404, static_file('not/a/file', root=root).status_code) f = static_file(os.path.join('./../', basename), root='./views/') self.assertEqual(403, f.status_code) + + def test_file_not_readable(self): + if os.geteuid() == 0: + return # Root can read anything + try: fp, fn = tempfile.mkstemp() os.chmod(fn, 0) |