Skip to content

Commit 8674957

Browse files
authored
Fix SSL deprecation in tests (#780)
`ssl.PROTOCOL_TLSv1` has been deprecated since Python 3.6. For test purposes, it's fine to be replaced with pretty much anything else.
1 parent cc76ac5 commit 8674957

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/unit/async_/test_driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ async def test_routing_driver_constructor(protocol, host, port, params, auth_tok
136136
ConfigurationError, "The config settings"
137137
),
138138
(
139-
{"ssl_context": ssl.SSLContext(ssl.PROTOCOL_TLSv1)},
139+
{"ssl_context": ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)},
140140
ConfigurationError, "The config settings"
141141
),
142142
)

tests/unit/sync/test_driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def test_routing_driver_constructor(protocol, host, port, params, auth_token):
136136
ConfigurationError, "The config settings"
137137
),
138138
(
139-
{"ssl_context": ssl.SSLContext(ssl.PROTOCOL_TLSv1)},
139+
{"ssl_context": ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)},
140140
ConfigurationError, "The config settings"
141141
),
142142
)

0 commit comments

Comments
 (0)