[test] Convert warnings into errors

* And fix some existing warnings

Authored by: fstirlitz
This commit is contained in:
pukkandan 2022-04-18 02:12:48 +05:30
parent 3d3bb1688b
commit b6dc37fe2a
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39
9 changed files with 13 additions and 11 deletions

View file

@ -66,8 +66,9 @@ class TestHTTPS(unittest.TestCase):
certfn = os.path.join(TEST_DIR, 'testcert.pem')
self.httpd = compat_http_server.HTTPServer(
('127.0.0.1', 0), HTTPTestRequestHandler)
self.httpd.socket = ssl.wrap_socket(
self.httpd.socket, certfile=certfn, server_side=True)
sslctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
sslctx.load_cert_chain(certfn, None)
self.httpd.socket = sslctx.wrap_socket(self.httpd.socket, server_side=True)
self.port = http_server_port(self.httpd)
self.server_thread = threading.Thread(target=self.httpd.serve_forever)
self.server_thread.daemon = True