nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 20.03 31 lines 1.3 kB view raw
1diff --git a/test/mitmproxy/net/test_tls.py b/test/mitmproxy/net/test_tls.py 2index 489bf89f..c78472e3 100644 3--- a/test/mitmproxy/net/test_tls.py 4+++ b/test/mitmproxy/net/test_tls.py 5@@ -87,14 +87,16 @@ def test_get_client_hello(): 6 rfile = io.BufferedReader(io.BytesIO( 7 FULL_CLIENT_HELLO_NO_EXTENSIONS[:30] 8 )) 9- with pytest.raises(exceptions.TlsProtocolException, message="Unexpected EOF"): 10+ with pytest.raises(exceptions.TlsProtocolException): 11 tls.get_client_hello(rfile) 12+ pytest.fail("Unexpected EOF") 13 14 rfile = io.BufferedReader(io.BytesIO( 15 b"GET /" 16 )) 17- with pytest.raises(exceptions.TlsProtocolException, message="Expected TLS record"): 18+ with pytest.raises(exceptions.TlsProtocolException): 19 tls.get_client_hello(rfile) 20+ pytest.fail("Expected TLS record") 21 22 23 class TestClientHello: 24@@ -153,5 +155,6 @@ class TestClientHello: 25 b"\x01\x00\x00\x03" + # handshake header 26 b"foo" 27 )) 28- with pytest.raises(exceptions.TlsProtocolException, message='Cannot parse Client Hello'): 29+ with pytest.raises(exceptions.TlsProtocolException): 30 tls.ClientHello.from_file(rfile) 31+ pytest.fail('Cannot parse Client Hello')