diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-07-24 23:49:58 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-07-24 23:49:58 +1200 |
commit | cb09488dc8e4b03706a9cc1fa71284a2f7ce33c1 (patch) | |
tree | 7cd729849dd077143d6b841f67745d4cf22e745b /test/test_rparse.py | |
parent | 8f0ebb405d898623f02d22e99505ba944884f398 (diff) | |
download | mitmproxy-cb09488dc8e4b03706a9cc1fa71284a2f7ce33c1.tar.gz mitmproxy-cb09488dc8e4b03706a9cc1fa71284a2f7ce33c1.tar.bz2 mitmproxy-cb09488dc8e4b03706a9cc1fa71284a2f7ce33c1.zip |
Make actions at end of message work.
Diffstat (limited to 'test/test_rparse.py')
-rw-r--r-- | test/test_rparse.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test_rparse.py b/test/test_rparse.py index dadf5bc1..634eb6a7 100644 --- a/test/test_rparse.py +++ b/test/test_rparse.py @@ -391,6 +391,20 @@ class TestWriteValues: rparse.write_values(s, tst[:], [(1, "pause", 0)], blocksize=i) assert s.getvalue() == "".join(tst) + def test_write_values_after(self): + s = cStringIO.StringIO() + r = rparse.parse_response({}, "400:da") + r.serve(s, None) + + s = cStringIO.StringIO() + r = rparse.parse_response({}, "400:p0,a") + r.serve(s, None) + + s = cStringIO.StringIO() + r = rparse.parse_response({}, "400:ia,'xx'") + r.serve(s, None) + assert s.getvalue().endswith('xx') + def test_ready_actions(): x = [(0, 5)] |