From 7a9d40817ce0a97317b7940f7da2bb64da02eb51 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Mon, 6 Feb 2017 17:48:44 +0100 Subject: pytest.raises: shim new API --- test/pathod/test_language_websocket.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/pathod/test_language_websocket.py') 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'") -- cgit v1.2.3