fix pytest invocation errors

This commit is contained in:
Maximilian Hils 2018-04-25 14:00:50 +02:00
parent f6b606b364
commit 19ceb6f49a
3 changed files with 3 additions and 3 deletions

View File

@ -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')

View File

@ -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):

View File

@ -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,)})