From 7049becdfe5fa16820fc7dd3da0866cf08464efd Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sun, 15 Dec 2013 06:42:58 +0100 Subject: always return Content-Length: 0 if r is not set --- test/test_pathoc.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/test_pathoc.py') 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) -- cgit v1.2.3