diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-07-22 15:26:05 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-07-22 15:26:05 +1200 |
commit | 817e550aa1da0eab8b9116f46f8d65a80fcb46e2 (patch) | |
tree | 0a961b2610fa2a213ef8def8d0317ea0f372ea5d /test/test_rparse.py | |
parent | 30a69883925a4ee01b6eb0586e8295fa72458b16 (diff) | |
download | mitmproxy-817e550aa1da0eab8b9116f46f8d65a80fcb46e2.tar.gz mitmproxy-817e550aa1da0eab8b9116f46f8d65a80fcb46e2.tar.bz2 mitmproxy-817e550aa1da0eab8b9116f46f8d65a80fcb46e2.zip |
Multiline specifications for pathod and pathoc.
Diffstat (limited to 'test/test_rparse.py')
-rw-r--r-- | test/test_rparse.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/test_rparse.py b/test/test_rparse.py index 1527bddf..8d157a10 100644 --- a/test/test_rparse.py +++ b/test/test_rparse.py @@ -250,6 +250,34 @@ class TestParseRequest: r = rparse.parse_request({}, 'GET:"/foo"') assert str(r) + def test_multiline(self): + l = """ + GET + "/foo" + ir,@1 + """ + r = rparse.parse_request({}, l) + assert r.method == "GET" + assert r.path == "/foo" + assert r.actions + + + l = """ + GET + + "/foo + + + + bar" + + ir,@1 + """ + r = rparse.parse_request({}, l) + assert r.method == "GET" + assert r.path.s.endswith("bar") + assert r.actions + class TestParseResponse: def test_parse_err(self): |