aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_protocol_http2.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_protocol_http2.py')
-rw-r--r--test/test_protocol_http2.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_protocol_http2.py b/test/test_protocol_http2.py
index 17b8506d..d3725e81 100644
--- a/test/test_protocol_http2.py
+++ b/test/test_protocol_http2.py
@@ -2,6 +2,8 @@ from __future__ import (absolute_import, print_function, division)
import inspect
import socket
+import OpenSSL
+import pytest
from io import BytesIO
import logging
@@ -15,6 +17,11 @@ import h2
from libmproxy import utils
from . import tservers
+requires_alpn = pytest.mark.skipif(
+ not OpenSSL._util.lib.Cryptography_HAS_ALPN,
+ reason="requires OpenSSL with ALPN support")
+
+
class SimpleHttp2Server(netlib_tservers.ServerTestBase):
ssl = dict(
alpn_select=b'h2',
@@ -49,6 +56,7 @@ class SimpleHttp2Server(netlib_tservers.ServerTestBase):
return
+@requires_alpn
class TestHttp2(tservers.ProxTestBase):
def _setup_connection(self):
self.config.http2 = True