diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-04-18 02:12:48 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-04-18 02:12:48 +0530 |
commit | b6dc37fe2aee167bf11f863f960a4888f4886718 (patch) | |
tree | 0f54c44d32768acf9066bae7c0791e162e877369 /test/test_http.py | |
parent | 3d3bb1688bfc5373105e6bf7c3d4729cf3f78788 (diff) | |
download | hypervideo-pre-b6dc37fe2aee167bf11f863f960a4888f4886718.tar.lz hypervideo-pre-b6dc37fe2aee167bf11f863f960a4888f4886718.tar.xz hypervideo-pre-b6dc37fe2aee167bf11f863f960a4888f4886718.zip |
[test] Convert warnings into errors
* And fix some existing warnings
Authored by: fstirlitz
Diffstat (limited to 'test/test_http.py')
-rw-r--r-- | test/test_http.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_http.py b/test/test_http.py index 029996ca9..d99be8be4 100644 --- a/test/test_http.py +++ b/test/test_http.py @@ -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 |