exclude tests on old OpenSSL without ALPN

This commit is contained in:
Thomas Kriechbaumer 2015-06-18 10:36:58 +02:00
parent 559c80214d
commit bd0cfef357
2 changed files with 44 additions and 39 deletions

View File

@ -1,6 +1,7 @@
import json
import cStringIO
import re
import OpenSSL
from mock import Mock
from netlib import tcp, http, http2
@ -231,6 +232,8 @@ class TestDaemon(_TestDaemon):
class TestDaemonHTTP2(_TestDaemon):
ssl = True
if OpenSSL._util.lib.Cryptography_HAS_ALPN:
def test_http2(self):
c = pathoc.Pathoc(
("127.0.0.1", self.d.port),

View File

@ -1,8 +1,9 @@
import sys
import cStringIO
import OpenSSL
from libpathod import pathod, version
from netlib import tcp, http, http2
import tutils
@ -271,12 +272,13 @@ class TestDaemonSSL(CommonTests):
assert self.d.last_log()["cipher"][1] > 0
class TestHTTP2(tutils.DaemonTests):
force_http2 = True
ssl = True
noweb = True
noapi = True
nohang = True
if OpenSSL._util.lib.Cryptography_HAS_ALPN:
def test_http2(self):
r, _ = self.pathoc(["GET:/"], ssl=True, use_http2=True)
print(r)