diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-01-25 19:09:14 +0100 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-02-04 09:52:03 +0100 |
commit | bfc7d3967c0978b22faeaedc653a695e65156b34 (patch) | |
tree | de0eee27fc2c29520c6a51c3ad03aaab1d4311ce /test | |
parent | 4501c8a0a158f15386d9dfe4884a9ffacb8ffd0b (diff) | |
download | mitmproxy-bfc7d3967c0978b22faeaedc653a695e65156b34.tar.gz mitmproxy-bfc7d3967c0978b22faeaedc653a695e65156b34.tar.bz2 mitmproxy-bfc7d3967c0978b22faeaedc653a695e65156b34.zip |
exclude tests if no alpn support present
Diffstat (limited to 'test')
-rw-r--r-- | test/test_protocol_http2.py | 8 |
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 |