diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2017-02-01 16:48:46 +0100 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2017-02-02 12:59:01 +0100 |
commit | ae008ed80b870688e4e0fe5ff305dc40c17458b4 (patch) | |
tree | e5d9fcd24a403f7491d0d6e42364bf91fdb2ac6e /test/pathod/test_protocols_http2.py | |
parent | ec92d7f67e3c5960d9b30e067fb4ed1ae3fc8884 (diff) | |
download | mitmproxy-ae008ed80b870688e4e0fe5ff305dc40c17458b4.tar.gz mitmproxy-ae008ed80b870688e4e0fe5ff305dc40c17458b4.tar.bz2 mitmproxy-ae008ed80b870688e4e0fe5ff305dc40c17458b4.zip |
replace tutils.raises with pytest.raises + shim
Diffstat (limited to 'test/pathod/test_protocols_http2.py')
-rw-r--r-- | test/pathod/test_protocols_http2.py | 8 |
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) |