diff options
author | Aldo Cortesi <aldo@corte.si> | 2014-01-04 14:48:12 -0800 |
---|---|---|
committer | Aldo Cortesi <aldo@corte.si> | 2014-01-04 14:48:12 -0800 |
commit | a9f8dcf755d2855f884c1b1f3f0bd52340efdc83 (patch) | |
tree | 448651d05f2f8bbda4b5d19a00af1013f6588365 /test/test_pathoc.py | |
parent | 467ef0c02a6351539abdc81e4c9f15b7c583d5dc (diff) | |
parent | 210e0c891e040d5dd21e361e6f17dbce3dbdde7f (diff) | |
download | mitmproxy-a9f8dcf755d2855f884c1b1f3f0bd52340efdc83.tar.gz mitmproxy-a9f8dcf755d2855f884c1b1f3f0bd52340efdc83.tar.bz2 mitmproxy-a9f8dcf755d2855f884c1b1f3f0bd52340efdc83.zip |
Merge pull request #11 from mitmproxy/refactor_read_http_body
always return Content-Length: 0 if r is not set
Diffstat (limited to 'test/test_pathoc.py')
-rw-r--r-- | test/test_pathoc.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test_pathoc.py b/test/test_pathoc.py index 31d73111..7493b2e7 100644 --- a/test/test_pathoc.py +++ b/test/test_pathoc.py @@ -136,16 +136,16 @@ class TestDaemon(_TestDaemon): def test_connect_fail(self): to = ("foobar", 80) c = pathoc.Pathoc("127.0.0.1", self.d.port) - r, w = cStringIO.StringIO(), cStringIO.StringIO() - tutils.raises("connect failed", c.http_connect, to, w, r) - r = cStringIO.StringIO( + c.rfile, c.wfile = cStringIO.StringIO(), cStringIO.StringIO() + tutils.raises("connect failed", c.http_connect, to) + c.rfile = cStringIO.StringIO( "HTTP/1.1 500 OK\r\n" ) - tutils.raises("connect failed", c.http_connect, to, w, r) - r = cStringIO.StringIO( + tutils.raises("connect failed", c.http_connect, to) + c.rfile = cStringIO.StringIO( "HTTP/1.1 200 OK\r\n" ) - c.http_connect(to, w, r) + c.http_connect(to) |