From e89c1dcbe5f292ea0e9e3059e55670cc337022a5 Mon Sep 17 00:00:00 2001 From: Rouven Bauer Date: Mon, 22 Aug 2022 14:15:41 +0200 Subject: [PATCH] Fix SSL deprecation in tests `ssl.PROTOCOL_TLSv1` has been deprecated since Python 3.6. For test purposes, it's fine to be replaced with pretty much anything else. --- tests/unit/async_/test_driver.py | 2 +- tests/unit/sync/test_driver.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/async_/test_driver.py b/tests/unit/async_/test_driver.py index a353857a8..8003ee1c1 100644 --- a/tests/unit/async_/test_driver.py +++ b/tests/unit/async_/test_driver.py @@ -136,7 +136,7 @@ async def test_routing_driver_constructor(protocol, host, port, params, auth_tok ConfigurationError, "The config settings" ), ( - {"ssl_context": ssl.SSLContext(ssl.PROTOCOL_TLSv1)}, + {"ssl_context": ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)}, ConfigurationError, "The config settings" ), ) diff --git a/tests/unit/sync/test_driver.py b/tests/unit/sync/test_driver.py index 0784cc271..81297c174 100644 --- a/tests/unit/sync/test_driver.py +++ b/tests/unit/sync/test_driver.py @@ -136,7 +136,7 @@ def test_routing_driver_constructor(protocol, host, port, params, auth_token): ConfigurationError, "The config settings" ), ( - {"ssl_context": ssl.SSLContext(ssl.PROTOCOL_TLSv1)}, + {"ssl_context": ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)}, ConfigurationError, "The config settings" ), )