diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-02-27 16:47:23 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-02-27 16:47:23 (GMT) |
commit | b389b482659a0633d84f15307c9605cc0bf28633 (patch) | |
tree | f331588e32a004549b84554fe3afcec959f28d59 /Lib/test/test_httplib.py | |
parent | 0b49637890c4f9ad125a670b496b3b6110e6def9 (diff) | |
download | cpython-b389b482659a0633d84f15307c9605cc0bf28633.zip cpython-b389b482659a0633d84f15307c9605cc0bf28633.tar.gz cpython-b389b482659a0633d84f15307c9605cc0bf28633.tar.bz2 |
Issue #23526: Fix ResourceWarning in test_httplib. Patch written by Alex Shkop.
Diffstat (limited to 'Lib/test/test_httplib.py')
-rw-r--r-- | Lib/test/test_httplib.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py index d0a0e8d..4c57867 100644 --- a/Lib/test/test_httplib.py +++ b/Lib/test/test_httplib.py @@ -840,6 +840,7 @@ class HTTPSTest(TestCase): context=context) h.request('GET', '/') resp = h.getresponse() + h.close() self.assertIn('nginx', resp.getheader('server')) @support.system_must_validate_cert @@ -851,6 +852,7 @@ class HTTPSTest(TestCase): h.request('GET', '/') resp = h.getresponse() content_type = resp.getheader('content-type') + h.close() self.assertIn('text/html', content_type) def test_networked_good_cert(self): @@ -865,6 +867,7 @@ class HTTPSTest(TestCase): h.request('GET', '/') resp = h.getresponse() server_string = resp.getheader('server') + h.close() self.assertIn('nginx', server_string) def test_networked_bad_cert(self): |