exclude tests if no alpn support present

This commit is contained in:
Thomas Kriechbaumer 2016-01-25 19:09:14 +01:00
parent 4501c8a0a1
commit bfc7d3967c

View File

@ -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