aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_http.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-04-18 02:12:48 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-04-18 02:12:48 +0530
commitb6dc37fe2aee167bf11f863f960a4888f4886718 (patch)
tree0f54c44d32768acf9066bae7c0791e162e877369 /test/test_http.py
parent3d3bb1688bfc5373105e6bf7c3d4729cf3f78788 (diff)
downloadhypervideo-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.py5
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