Commit acbaa923 authored by Senthil Kumaran's avatar Senthil Kumaran

Call unfakehttp in order to close connection while opening the connection...

Call unfakehttp in order to close connection while opening the connection through a fakehttp object.
Address issue11609 - urllib related buildbots failure.
parent d24c991f
...@@ -176,8 +176,11 @@ class urlopen_HttpTests(unittest.TestCase): ...@@ -176,8 +176,11 @@ class urlopen_HttpTests(unittest.TestCase):
def test_willclose(self): def test_willclose(self):
self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello!") self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello!")
resp = urlopen("http://www.python.org") try:
self.assertTrue(resp.fp.will_close) resp = urlopen("http://www.python.org")
self.assertTrue(resp.fp.will_close)
finally:
self.unfakehttp()
def test_read_0_9(self): def test_read_0_9(self):
# "0.9" response accepted (but not "simple responses" without # "0.9" response accepted (but not "simple responses" without
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment