34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
|
|
From 25cca389496b86ee809c21e5b641aeaa74809263 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Seth Michael Larson <sethmichaellarson@gmail.com>
|
||
|
|
Date: Tue, 25 Apr 2023 02:10:00 AM GMT+0800
|
||
|
|
Subject: [PATCH] fix test_ssl_object_attributes
|
||
|
|
|
||
|
|
Conflict:NA
|
||
|
|
Reference:https://github.com/urllib3/urllib3/commit/25cca389496b86ee809c21e5b641aeaa74809263
|
||
|
|
|
||
|
|
---
|
||
|
|
test/test_ssltransport.py | 7 +++++--
|
||
|
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/test/test_ssltransport.py b/test/test_ssltransport.py
|
||
|
|
index e8d779f..809e053 100644
|
||
|
|
--- a/test/test_ssltransport.py
|
||
|
|
+++ b/test/test_ssltransport.py
|
||
|
|
@@ -205,8 +205,11 @@ class SingleTLSLayerTestCase(SocketDummyServerTestCase):
|
||
|
|
assert ssock.selected_npn_protocol() is None
|
||
|
|
|
||
|
|
shared_ciphers = ssock.shared_ciphers()
|
||
|
|
- assert type(shared_ciphers) == list
|
||
|
|
- assert len(shared_ciphers) > 0
|
||
|
|
+ # SSLContext.shared_ciphers() changed behavior completely in a patch version.
|
||
|
|
+ # See: https://github.com/python/cpython/issues/96931
|
||
|
|
+ assert shared_ciphers is None or (
|
||
|
|
+ type(shared_ciphers) is list and len(shared_ciphers) > 0
|
||
|
|
+ )
|
||
|
|
|
||
|
|
assert ssock.compression() is None
|
||
|
|
|
||
|
|
--
|
||
|
|
2.23.0
|
||
|
|
|