diff options
| author | Aldo Cortesi <aldo@nullcube.com> | 2012-07-30 13:52:40 +1200 |
|---|---|---|
| committer | Aldo Cortesi <aldo@nullcube.com> | 2012-07-30 13:52:40 +1200 |
| commit | e26aac1d3c6e4ca9f09cffa9d61d5a632dc35f14 (patch) | |
| tree | ba18dbb0801386d831ddb97413214dc08721c46a /test/test_pathod.py | |
| parent | 43314c77c8786367d4a52a55f642dd3d578a2a2b (diff) | |
| download | mitmproxy-e26aac1d3c6e4ca9f09cffa9d61d5a632dc35f14.tar.gz mitmproxy-e26aac1d3c6e4ca9f09cffa9d61d5a632dc35f14.tar.bz2 mitmproxy-e26aac1d3c6e4ca9f09cffa9d61d5a632dc35f14.zip | |
100% test coverage.
Diffstat (limited to 'test/test_pathod.py')
| -rw-r--r-- | test/test_pathod.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_pathod.py b/test/test_pathod.py index d6e2e886..8bc896d3 100644 --- a/test/test_pathod.py +++ b/test/test_pathod.py @@ -107,6 +107,12 @@ class CommonTests(tutils.DaemonTests): assert l["type"] == "error" assert "Invalid" in l["msg"] + def test_invalid_headers(self): + tutils.raises(http.HttpError, self.pathoc, "get:/:h'\t'='foo'") + l = self.d.log()[0] + assert l["type"] == "error" + assert "Invalid headers" in l["msg"] + def test_access_denied(self): rsp = self.get("=nonexistent") assert rsp.status_code == 800 |
