From abbe88c8ce4f19de33723ac0828cd24b8ec5f38b Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Mon, 8 Jun 2015 13:25:42 +0200 Subject: fix non-ALPN supported OpenSSL-related tests --- test/test_tcp.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/test_tcp.py') diff --git a/test/test_tcp.py b/test/test_tcp.py index f8fc6a28..d5506556 100644 --- a/test/test_tcp.py +++ b/test/test_tcp.py @@ -370,13 +370,19 @@ class TestALPN(test.ServerTestBase): ) if OpenSSL._util.lib.Cryptography_HAS_ALPN: - def test_alpn(self): c = tcp.TCPClient(("127.0.0.1", self.port)) c.connect() c.convert_to_ssl(alpn_protos=["foobar"]) assert c.get_alpn_proto_negotiated() == "foobar" + else: + def test_none_alpn(self): + c = tcp.TCPClient(("127.0.0.1", self.port)) + c.connect() + c.convert_to_ssl(alpn_protos=["foobar"]) + assert c.get_alpn_proto_negotiated() == None + class TestSSLTimeOut(test.ServerTestBase): handler = HangHandler -- cgit v1.2.3