summary refs log tree commit diff
path: root/pkgs/tools/networking/mitmproxy/pytest5.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/networking/mitmproxy/pytest5.patch')
-rw-r--r--pkgs/tools/networking/mitmproxy/pytest5.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/tools/networking/mitmproxy/pytest5.patch b/pkgs/tools/networking/mitmproxy/pytest5.patch
new file mode 100644
index 00000000000..bfbf7253b9c
--- /dev/null
+++ b/pkgs/tools/networking/mitmproxy/pytest5.patch
@@ -0,0 +1,31 @@
+diff --git a/test/mitmproxy/net/test_tls.py b/test/mitmproxy/net/test_tls.py
+index 489bf89f..c78472e3 100644
+--- a/test/mitmproxy/net/test_tls.py
++++ b/test/mitmproxy/net/test_tls.py
+@@ -87,14 +87,16 @@ def test_get_client_hello():
+     rfile = io.BufferedReader(io.BytesIO(
+         FULL_CLIENT_HELLO_NO_EXTENSIONS[:30]
+     ))
+-    with pytest.raises(exceptions.TlsProtocolException, message="Unexpected EOF"):
++    with pytest.raises(exceptions.TlsProtocolException):
+         tls.get_client_hello(rfile)
++        pytest.fail("Unexpected EOF")
+ 
+     rfile = io.BufferedReader(io.BytesIO(
+         b"GET /"
+     ))
+-    with pytest.raises(exceptions.TlsProtocolException, message="Expected TLS record"):
++    with pytest.raises(exceptions.TlsProtocolException):
+         tls.get_client_hello(rfile)
++        pytest.fail("Expected TLS record")
+ 
+ 
+ class TestClientHello:
+@@ -153,5 +155,6 @@ class TestClientHello:
+             b"\x01\x00\x00\x03" +  # handshake header
+             b"foo"
+         ))
+-        with pytest.raises(exceptions.TlsProtocolException, message='Cannot parse Client Hello'):
++        with pytest.raises(exceptions.TlsProtocolException):
+             tls.ClientHello.from_file(rfile)
++            pytest.fail('Cannot parse Client Hello')