mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 10:16:27 +00:00
[sans-io] minor test improvements
This commit is contained in:
parent
a402bfed24
commit
4cd83ee0af
@ -7,7 +7,7 @@ from mitmproxy.proxy2 import context
|
||||
@pytest.fixture
|
||||
def tctx():
|
||||
return context.Context(
|
||||
context.Client("client"),
|
||||
context.Server("server"),
|
||||
context.Client(("client", 1234)),
|
||||
context.Server(("server", 42)),
|
||||
options.Options()
|
||||
)
|
||||
|
@ -135,7 +135,9 @@ class playbook:
|
||||
|
||||
def _str(x):
|
||||
arrow = ">" if isinstance(x, events.Event) else "<"
|
||||
x = str(x).replace('Placeholder:', '')
|
||||
x = str(x)\
|
||||
.replace('Placeholder:None', '<unset placeholder>')\
|
||||
.replace('Placeholder:', '')
|
||||
return f"{arrow} {x}"
|
||||
|
||||
diff = "\n".join(difflib.ndiff(
|
||||
|
Loading…
Reference in New Issue
Block a user