diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2017-02-06 17:48:44 +0100 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2017-02-08 20:04:07 +0100 |
commit | 7a9d40817ce0a97317b7940f7da2bb64da02eb51 (patch) | |
tree | 10447e8bf5d9ca3a53c03ed48a371662dfc52218 /test/pathod/test_language_websocket.py | |
parent | 28c0596742674dd59df317a91389f3826b7d5e66 (diff) | |
download | mitmproxy-7a9d40817ce0a97317b7940f7da2bb64da02eb51.tar.gz mitmproxy-7a9d40817ce0a97317b7940f7da2bb64da02eb51.tar.bz2 mitmproxy-7a9d40817ce0a97317b7940f7da2bb64da02eb51.zip |
pytest.raises: shim new API
Diffstat (limited to 'test/pathod/test_language_websocket.py')
-rw-r--r-- | test/pathod/test_language_websocket.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/pathod/test_language_websocket.py b/test/pathod/test_language_websocket.py index 20f6a3a6..e5046591 100644 --- a/test/pathod/test_language_websocket.py +++ b/test/pathod/test_language_websocket.py @@ -130,7 +130,7 @@ class TestWebsocketFrame: assert frm.payload == b"abc" def test_knone(self): - with pytest.raises("expected 4 bytes"): + with pytest.raises(Exception, match="Expected 4 bytes"): self.fr("wf:b'foo':mask:knone") def test_length(self): @@ -138,5 +138,5 @@ class TestWebsocketFrame: frm = self.fr("wf:l2:b'foo'") assert frm.header.payload_length == 2 assert frm.payload == b"fo" - with pytest.raises("expected 1024 bytes"): + with pytest.raises(Exception, match="Expected 1024 bytes"): self.fr("wf:l1024:b'foo'") |