From ae008ed80b870688e4e0fe5ff305dc40c17458b4 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Wed, 1 Feb 2017 16:48:46 +0100 Subject: replace tutils.raises with pytest.raises + shim --- test/pathod/test_protocols_http2.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/pathod/test_protocols_http2.py') 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) -- cgit v1.2.3