aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2018-04-25 14:00:50 +0200
committerMaximilian Hils <git@maximilianhils.com>2018-04-25 14:00:50 +0200
commit19ceb6f49a791e51106d1605fb47ff0e3155b434 (patch)
tree54b759a2577608a5e1cd5227a19ad92a60a8221a /test
parentf6b606b3643d0f447dac9830d25ac1853f8610fe (diff)
downloadmitmproxy-19ceb6f49a791e51106d1605fb47ff0e3155b434.tar.gz
mitmproxy-19ceb6f49a791e51106d1605fb47ff0e3155b434.tar.bz2
mitmproxy-19ceb6f49a791e51106d1605fb47ff0e3155b434.zip
fix pytest invocation errors
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/contentviews/test_protobuf.py2
-rw-r--r--test/mitmproxy/test_connections.py2
-rw-r--r--test/mitmproxy/test_stateobject.py2
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,)})