aboutsummaryrefslogtreecommitdiffstats
path: root/test/pathod/test_pathod.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/pathod/test_pathod.py')
-rw-r--r--test/pathod/test_pathod.py12
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