aboutsummaryrefslogtreecommitdiffstats
path: root/test/pathod/test_language_websocket.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2017-02-09 10:42:55 +0100
committerGitHub <noreply@github.com>2017-02-09 10:42:55 +0100
commit4cf6047a4eaf0d6f314ba5163ebda604c8836c9d (patch)
tree10447e8bf5d9ca3a53c03ed48a371662dfc52218 /test/pathod/test_language_websocket.py
parent28c0596742674dd59df317a91389f3826b7d5e66 (diff)
parent7a9d40817ce0a97317b7940f7da2bb64da02eb51 (diff)
downloadmitmproxy-4cf6047a4eaf0d6f314ba5163ebda604c8836c9d.tar.gz
mitmproxy-4cf6047a4eaf0d6f314ba5163ebda604c8836c9d.tar.bz2
mitmproxy-4cf6047a4eaf0d6f314ba5163ebda604c8836c9d.zip
Merge pull request #1999 from Kriechi/coverage++
pytest.raises: shim new API
Diffstat (limited to 'test/pathod/test_language_websocket.py')
-rw-r--r--test/pathod/test_language_websocket.py4
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'")