mirror of
https://github.com/python/cpython.git
synced 2025-10-14 02:43:49 +00:00
Issue #23526: Fix ResourceWarning in test_httplib. Patch written by Alex Shkop.
This commit is contained in:
parent
0b49637890
commit
b389b48265
2 changed files with 4 additions and 0 deletions
|
@ -840,6 +840,7 @@ class HTTPSTest(TestCase):
|
||||||
context=context)
|
context=context)
|
||||||
h.request('GET', '/')
|
h.request('GET', '/')
|
||||||
resp = h.getresponse()
|
resp = h.getresponse()
|
||||||
|
h.close()
|
||||||
self.assertIn('nginx', resp.getheader('server'))
|
self.assertIn('nginx', resp.getheader('server'))
|
||||||
|
|
||||||
@support.system_must_validate_cert
|
@support.system_must_validate_cert
|
||||||
|
@ -851,6 +852,7 @@ class HTTPSTest(TestCase):
|
||||||
h.request('GET', '/')
|
h.request('GET', '/')
|
||||||
resp = h.getresponse()
|
resp = h.getresponse()
|
||||||
content_type = resp.getheader('content-type')
|
content_type = resp.getheader('content-type')
|
||||||
|
h.close()
|
||||||
self.assertIn('text/html', content_type)
|
self.assertIn('text/html', content_type)
|
||||||
|
|
||||||
def test_networked_good_cert(self):
|
def test_networked_good_cert(self):
|
||||||
|
@ -865,6 +867,7 @@ class HTTPSTest(TestCase):
|
||||||
h.request('GET', '/')
|
h.request('GET', '/')
|
||||||
resp = h.getresponse()
|
resp = h.getresponse()
|
||||||
server_string = resp.getheader('server')
|
server_string = resp.getheader('server')
|
||||||
|
h.close()
|
||||||
self.assertIn('nginx', server_string)
|
self.assertIn('nginx', server_string)
|
||||||
|
|
||||||
def test_networked_bad_cert(self):
|
def test_networked_bad_cert(self):
|
||||||
|
|
|
@ -1247,6 +1247,7 @@ Alexander Shigin
|
||||||
Pete Shinners
|
Pete Shinners
|
||||||
Michael Shiplett
|
Michael Shiplett
|
||||||
John W. Shipman
|
John W. Shipman
|
||||||
|
Alex Shkop
|
||||||
Joel Shprentz
|
Joel Shprentz
|
||||||
Yue Shuaijie
|
Yue Shuaijie
|
||||||
Terrel Shumway
|
Terrel Shumway
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue