Skip to content

Commit

Permalink
Don't fail coverage when skipping the HTTP/2 test
Browse files Browse the repository at this point in the history
  • Loading branch information
vfaronov committed Mar 5, 2017
1 parent 1e175d9 commit 28996de
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test_real_mitmdump.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- coding: utf-8; -*-
# pylint: disable=redefined-outer-name

"""Spin up an actual mitmdump process and run a few requests through it."""

Expand Down Expand Up @@ -86,7 +87,7 @@ def real_mitmdump(request): # pylint: disable=unused-argument
return RealMitmdump()


def test_http11_proxy(real_mitmdump): # pylint: disable=redefined-outer-name
def test_http11_proxy(real_mitmdump):
with real_mitmdump:
real_mitmdump.send_request(
b'GET http://httpbin.org/response-headers?ETag=foobar HTTP/1.1\r\n'
Expand All @@ -101,7 +102,7 @@ def test_http11_proxy(real_mitmdump): # pylint: disable=redefined-outer-name
)


def test_http11_tunnel(real_mitmdump): # pylint: disable=redefined-outer-name
def test_http11_tunnel(real_mitmdump):
with real_mitmdump:
real_mitmdump.send_tunneled_request(
'httpd.apache.org', 443,
Expand All @@ -121,7 +122,7 @@ def test_http11_tunnel(real_mitmdump): # pylint: disable=redefined-outer-name

@pytest.mark.skipif(ssl.OPENSSL_VERSION_INFO < (1, 0, 2),
reason='HTTP/2 needs ALPN, which needs OpenSSL 1.0.2+')
def test_http2_reverse(real_mitmdump): # pylint: disable=redefined-outer-name
def test_http2_reverse(real_mitmdump): # pragma: no cover
# A TLS context that does not verify certificates.
context = hyper.tls.init_context()
context.check_hostname = False
Expand Down

0 comments on commit 28996de

Please sign in to comment.