summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2011-03-19 09:45:40 (GMT)
committerSenthil Kumaran <orsenthil@gmail.com>2011-03-19 09:45:40 (GMT)
commitd24c991f11541ccdb3cddade4a59ae0d2c0908bd (patch)
tree6572268789decab2443ae41d0bc09393cb5956e6 /Lib/test
parentaf9be06b3c82766110d9d4cc1e8bc3ad7fcfbf84 (diff)
parentd91ffcafcb39a5426e73ce9ec4b15077662ec571 (diff)
downloadcpython-d24c991f11541ccdb3cddade4a59ae0d2c0908bd.zip
cpython-d24c991f11541ccdb3cddade4a59ae0d2c0908bd.tar.gz
cpython-d24c991f11541ccdb3cddade4a59ae0d2c0908bd.tar.bz2
Merging it again.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_urllib.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index 673afc4..074d833 100644
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -91,7 +91,7 @@ class urlopen_FileTests(unittest.TestCase):
"did not return the expected text")
def test_close(self):
- # Test close() by calling it hear and then having it be called again
+ # Test close() by calling it here and then having it be called again
# by the tearDown() method for the test
self.returned_obj.close()
@@ -174,6 +174,11 @@ class urlopen_HttpTests(unittest.TestCase):
finally:
self.unfakehttp()
+ def test_willclose(self):
+ self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello!")
+ resp = urlopen("http://www.python.org")
+ self.assertTrue(resp.fp.will_close)
+
def test_read_0_9(self):
# "0.9" response accepted (but not "simple responses" without
# a status line)