Skip to content

Commit bf86a0d

Browse files
donBarbospicnixz
andauthored
Update test_httpservers.py
Co-authored-by: Bénédikt Tran <[email protected]>
1 parent b6ba37f commit bf86a0d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Lib/test/test_httpservers.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,10 +356,9 @@ def test_get(self):
356356
self.assertEqual(response.status, HTTPStatus.OK)
357357

358358
def request(self, uri, method='GET', body=None, headers={}):
359+
context = ssl._create_unverified_context()
359360
self.connection = http.client.HTTPSConnection(
360-
self.HOST,
361-
self.PORT,
362-
context=ssl._create_unverified_context()
361+
self.HOST, self.PORT, context=context
363362
)
364363
self.connection.request(method, uri, body, headers)
365364
return self.connection.getresponse()

0 commit comments

Comments
 (0)