diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-06-24 17:23:37 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-06-24 17:23:37 +1200 |
commit | 75f06d56cd87c9458a758277bdc1905d0637a532 (patch) | |
tree | 2b66f63bb94adf4c00da8e3dd936d3273a0388c1 /test | |
parent | d4ad3f0b2cc5ae878108e13e86679fac2abaedb2 (diff) | |
download | mitmproxy-75f06d56cd87c9458a758277bdc1905d0637a532.tar.gz mitmproxy-75f06d56cd87c9458a758277bdc1905d0637a532.tar.bz2 mitmproxy-75f06d56cd87c9458a758277bdc1905d0637a532.zip |
Request method parsing.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_rparse.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_rparse.py b/test/test_rparse.py index 727a89f6..2b8543a2 100644 --- a/test/test_rparse.py +++ b/test/test_rparse.py @@ -88,6 +88,12 @@ class TestMisc: assert rparse.Value.parseString('"val"')[0].val == "val" assert rparse.Value.parseString('"\'val\'"')[0].val == "'val'" + def test_method(self): + e = rparse.Method.expr() + assert e.parseString("get")[0].value == "GET" + assert e.parseString("'foo'")[0].value.val == "foo" + assert e.parseString("'get'")[0].value.val == "get" + def test_body(self): e = rparse.Body.expr() v = e.parseString("b'foo'")[0] |