mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-02-02 00:05:27 +00:00
fix pytest invocation errors
This commit is contained in:
parent
f6b606b364
commit
19ceb6f49a
@ -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')
|
||||
|
||||
|
||||
|
@ -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):
|
||||
|
@ -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,)})
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user