]> granicus.if.org Git - python/commitdiff
test verifying the resp object is closed for HEAD response.
authorSenthil Kumaran <orsenthil@gmail.com>
Fri, 4 Jun 2010 17:17:09 +0000 (17:17 +0000)
committerSenthil Kumaran <orsenthil@gmail.com>
Fri, 4 Jun 2010 17:17:09 +0000 (17:17 +0000)
Lib/test/test_httplib.py

index a618c43e9eb70fd247bfb509c0464c67a5b9a2ed..2d0b8e750bd7ef9911cc0795371f10f77dd5b5d5 100644 (file)
@@ -227,7 +227,7 @@ class BasicTest(TestCase):
         self.assertEquals(resp.read(), '')
         self.assertEquals(resp.status, 200)
         self.assertEquals(resp.reason, 'OK')
-        resp.close()
+        self.assertTrue(resp.isclosed())
 
     def test_negative_content_length(self):
         sock = FakeSocket('HTTP/1.1 200 OK\r\n'