diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-06-29 10:42:15 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-06-29 10:42:15 +1200 |
commit | 1b42f5ab1f3e22c760d155c7e3dea283032a517e (patch) | |
tree | 0467cad0758989ebd35e02d91df54e7b9e7fc7b0 /test/test_rparse.py | |
parent | 4040df664ba1d05acf29293141ca650c69a8788b (diff) | |
download | mitmproxy-1b42f5ab1f3e22c760d155c7e3dea283032a517e.tar.gz mitmproxy-1b42f5ab1f3e22c760d155c7e3dea283032a517e.tar.bz2 mitmproxy-1b42f5ab1f3e22c760d155c7e3dea283032a517e.zip |
Allow naked literals for path specification.
Diffstat (limited to 'test/test_rparse.py')
-rw-r--r-- | test/test_rparse.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_rparse.py b/test/test_rparse.py index 9f330f51..cb1076c2 100644 --- a/test/test_rparse.py +++ b/test/test_rparse.py @@ -42,6 +42,10 @@ class TestMisc: assert v.expr() assert str(v) + def test_valuenakedliteral(self): + v = rparse.ValueNakedLiteral("foo") + assert v.expr() + def test_file_value(self): v = rparse.Value.parseString("<'one two'")[0] assert str(v) @@ -200,6 +204,10 @@ class TestParseRequest: r = rparse.parse_request({}, 'GET:"/foo"') assert r.method == "GET" assert r.path == "/foo" + r = rparse.parse_request({}, 'GET:/foo') + assert r.path == "/foo" + r = rparse.parse_request({}, 'GET:@1k') + assert len(r.path) == 1024 def test_render(self): s = cStringIO.StringIO() |