aboutsummaryrefslogtreecommitdiffstats
path: root/test/pathod/test_protocols_http2.py
diff options
context:
space:
mode:
authorThomas Kriechbaumer <Kriechi@users.noreply.github.com>2017-02-02 17:23:11 +0100
committerGitHub <noreply@github.com>2017-02-02 17:23:11 +0100
commit3f4d472c80f707b3ffbc060123d811c6bcae2afd (patch)
tree465ed866617e3d613078f1a682ff4eb5018c43f1 /test/pathod/test_protocols_http2.py
parentc1bc1ea584d4bb47c1b754dfa7f10ab4dfc380a3 (diff)
parent4f0b2bc4dec4eb3c4f0075bcebebeb126a5a6e88 (diff)
downloadmitmproxy-3f4d472c80f707b3ffbc060123d811c6bcae2afd.tar.gz
mitmproxy-3f4d472c80f707b3ffbc060123d811c6bcae2afd.tar.bz2
mitmproxy-3f4d472c80f707b3ffbc060123d811c6bcae2afd.zip
Merge pull request #1980 from Kriechi/improve-tests
improve tests
Diffstat (limited to 'test/pathod/test_protocols_http2.py')
-rw-r--r--test/pathod/test_protocols_http2.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/pathod/test_protocols_http2.py b/test/pathod/test_protocols_http2.py
index 2f92dc54..5bb31031 100644
--- a/test/pathod/test_protocols_http2.py
+++ b/test/pathod/test_protocols_http2.py
@@ -1,9 +1,9 @@
from unittest import mock
import codecs
-
+import pytest
import hyperframe
+
from mitmproxy.net import tcp, http
-from mitmproxy.test.tutils import raises
from mitmproxy.net.http import http2
from mitmproxy import exceptions
@@ -95,7 +95,7 @@ class TestCheckALPNMismatch(net_tservers.ServerTestBase):
with c.connect():
c.convert_to_ssl(alpn_protos=[b'h2'])
protocol = HTTP2StateProtocol(c)
- with raises(NotImplementedError):
+ with pytest.raises(NotImplementedError):
protocol.check_alpn()
@@ -132,7 +132,7 @@ class TestPerformServerConnectionPreface(net_tservers.ServerTestBase):
protocol.perform_server_connection_preface()
assert protocol.connection_preface_performed
- with raises(exceptions.TcpDisconnect):
+ with pytest.raises(exceptions.TcpDisconnect):
protocol.perform_server_connection_preface(force=True)