Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit 171ed79

Browse files
committed
Use hyper's compatible ssl wrapper
1 parent 4f223b5 commit 171ed79

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/test_SSLContext.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55
import hyper
66
from hyper import HTTP20Connection
7-
import ssl
7+
from hyper.compat import ssl
88
import pytest
99

1010
class TestSSLContext(object):
@@ -43,8 +43,8 @@ def test_http20Connection_with_custom_context(self):
4343
context.set_npn_protocols(['h2', 'h2-15'])
4444
context.options |= ssl.OP_NO_COMPRESSION
4545

46-
conn = HTTP20Connection('http2bin.org:443', SSLContext=context)
46+
conn = HTTP20Connection('http2bin.org:443', ssl_context=context)
4747

48-
assert conn._SSLContext.check_hostname == True
49-
assert conn._SSLContext.verify_mode == ssl.CERT_REQUIRED
50-
assert conn._SSLContext.options & ssl.OP_NO_COMPRESSION != 0
48+
assert conn.ssl_context.check_hostname == True
49+
assert conn.ssl_context.verify_mode == ssl.CERT_REQUIRED
50+
assert conn.ssl_context.options & ssl.OP_NO_COMPRESSION != 0

0 commit comments

Comments
 (0)