diff options
author | Maximilian Hils <git@maximilianhils.com> | 2018-04-25 06:15:28 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-25 06:15:28 -0600 |
commit | 5546f0a05ec21db986f0639cee9e89452ba68642 (patch) | |
tree | 54b759a2577608a5e1cd5227a19ad92a60a8221a /test | |
parent | f6b606b3643d0f447dac9830d25ac1853f8610fe (diff) | |
parent | 19ceb6f49a791e51106d1605fb47ff0e3155b434 (diff) | |
download | mitmproxy-5546f0a05ec21db986f0639cee9e89452ba68642.tar.gz mitmproxy-5546f0a05ec21db986f0639cee9e89452ba68642.tar.bz2 mitmproxy-5546f0a05ec21db986f0639cee9e89452ba68642.zip |
Merge pull request #3077 from mhils/pytest-fix
Fix pytest invocation errors
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/contentviews/test_protobuf.py | 2 | ||||
-rw-r--r-- | test/mitmproxy/test_connections.py | 2 | ||||
-rw-r--r-- | test/mitmproxy/test_stateobject.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/test/mitmproxy/contentviews/test_protobuf.py b/test/mitmproxy/contentviews/test_protobuf.py index 6c6e37f2..d0c4f42a 100644 --- a/test/mitmproxy/contentviews/test_protobuf.py +++ b/test/mitmproxy/contentviews/test_protobuf.py @@ -16,7 +16,7 @@ def test_view_protobuf_request(): content_type, output = v(raw) assert content_type == "Protobuf" assert output == [[('text', '1: 3bbc333c-e61c-433b-819a-0b9a8cc103b8')]] - with pytest.raises(ValueError, matches="Failed to parse input."): + with pytest.raises(ValueError, match="Failed to parse input."): v(b'foobar') diff --git a/test/mitmproxy/test_connections.py b/test/mitmproxy/test_connections.py index 845a9043..acd98eb8 100644 --- a/test/mitmproxy/test_connections.py +++ b/test/mitmproxy/test_connections.py @@ -160,7 +160,7 @@ class TestServerConnection: def test_sni(self): c = connections.ServerConnection(('', 1234)) - with pytest.raises(ValueError, matches='sni must be str, not '): + with pytest.raises(ValueError, match='sni must be str, not '): c.establish_tls(sni=b'foobar') def test_state(self): diff --git a/test/mitmproxy/test_stateobject.py b/test/mitmproxy/test_stateobject.py index bd5d1792..a642e023 100644 --- a/test/mitmproxy/test_stateobject.py +++ b/test/mitmproxy/test_stateobject.py @@ -93,7 +93,7 @@ def test_tuple(): def test_tuple_err(): a = TTuple(None) - with pytest.raises(ValueError, msg="Invalid data"): + with pytest.raises(ValueError, match="Invalid data"): a.set_state({"x": (42,)}) |