diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-07-23 17:53:17 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-07-23 17:53:17 +1200 |
commit | 763e1ff7862e8784170e7c23a015eceaa19e2f70 (patch) | |
tree | 622697715d8e0ef0f1d150d7673170bbb322a6b1 /test | |
parent | 1d1098687cd397966cf810b52cbf9fe1bc8b1ec4 (diff) | |
download | mitmproxy-763e1ff7862e8784170e7c23a015eceaa19e2f70.tar.gz mitmproxy-763e1ff7862e8784170e7c23a015eceaa19e2f70.tar.bz2 mitmproxy-763e1ff7862e8784170e7c23a015eceaa19e2f70.zip |
pathod.py unit tests++
Diffstat (limited to 'test')
-rw-r--r-- | test/test_pathod.py | 5 | ||||
-rw-r--r-- | test/test_rparse.py | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/test/test_pathod.py b/test/test_pathod.py index fae00ec2..0adba8e6 100644 --- a/test/test_pathod.py +++ b/test/test_pathod.py @@ -85,6 +85,11 @@ class CommonTests(tutils.DaemonTests): rsp = self.get("=nonexistent") assert rsp.status_code == 800 + def test_source_access_denied(self): + rsp = self.get("200:b</foo") + assert rsp.status_code == 800 + assert "Access Denied" in rsp.content + class TestDaemon(CommonTests): SSL = False diff --git a/test/test_rparse.py b/test/test_rparse.py index 5856d86d..88c1b617 100644 --- a/test/test_rparse.py +++ b/test/test_rparse.py @@ -69,7 +69,7 @@ class TestMisc: assert v.get_generator(dict(staticdir=t)) v = rparse.Value.parseString("<path2")[0] - tutils.raises(rparse.ServerError, v.get_generator, dict(staticdir=t)) + tutils.raises(rparse.FileAccessDenied, v.get_generator, dict(staticdir=t)) tutils.raises("access disabled", v.get_generator, dict()) v = rparse.Value.parseString("</outside")[0] |