From 81bdd64a7ef173df148bc03b1ec3c83f87d30da1 Mon Sep 17 00:00:00 2001 From: Nocturn9x Date: Sun, 18 Jun 2023 13:22:57 +0200 Subject: [PATCH] Simplified https test --- tests/https_test.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/https_test.py b/tests/https_test.py index 67c3bdb..298b7ca 100644 --- a/tests/https_test.py +++ b/tests/https_test.py @@ -1,6 +1,5 @@ import structio import sys -import ssl import time _print = print @@ -13,9 +12,7 @@ def print(*args, **kwargs): async def test(host: str, port: int, bufsize: int = 4096): print(f"Attempting a connection to {host}:{port}") - context = ssl.create_default_context() - context.server_hostname = host - socket = await structio.socket.connect_ssl_socket(host, port, ssl_context=context) + socket = await structio.socket.connect_ssl_socket(host, port) print("Connected") # Ensures the code below doesn't run for more than 5 seconds with structio.skip_after(5) as scope: