diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-12-01 10:36:18 +0100 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-12-04 11:04:06 +0100 |
commit | 1a36efbb6a2d689aaf05c6d7dd614072fd7d6c1c (patch) | |
tree | 4f70b854bffc2d9ad5bc6092b9e5d774bbb29d15 /test/pathod/test_pathod.py | |
parent | 741c2b7b66cbfb60cdf466063cdba3972b2ce2ee (diff) | |
download | mitmproxy-1a36efbb6a2d689aaf05c6d7dd614072fd7d6c1c.tar.gz mitmproxy-1a36efbb6a2d689aaf05c6d7dd614072fd7d6c1c.tar.bz2 mitmproxy-1a36efbb6a2d689aaf05c6d7dd614072fd7d6c1c.zip |
simplify ALPN and OpenSSL on macOS
Diffstat (limited to 'test/pathod/test_pathod.py')
-rw-r--r-- | test/pathod/test_pathod.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/pathod/test_pathod.py b/test/pathod/test_pathod.py index 6a4e1c62..1e34af23 100644 --- a/test/pathod/test_pathod.py +++ b/test/pathod/test_pathod.py @@ -1,11 +1,14 @@ import io +import pytest + from pathod import pathod from mitmproxy.net import tcp from mitmproxy import exceptions from mitmproxy.test import tutils from . import tservers +from ..conftest import requires_alpn class TestPathod: @@ -257,8 +260,11 @@ class TestHTTP2(tservers.DaemonTests): ssl = True nohang = True - if tcp.HAS_ALPN: + @requires_alpn + def test_http2(self): + r, _ = self.pathoc(["GET:/"], ssl=True, use_http2=True) + assert r[0].status_code == 800 - def test_http2(self): + def test_no_http2(self, disable_alpn): + with pytest.raises(NotImplementedError): r, _ = self.pathoc(["GET:/"], ssl=True, use_http2=True) - assert r[0].status_code == 800 |