MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_configure

Function test_configure

test/mitmproxy/addons/test_dumper.py:18–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16
17
18def test_configure():
19 d = dumper.Dumper()
20 with taddons.context(d) as ctx:
21 ctx.configure(d, dumper_filter="~b foo")
22 assert d.filter
23
24 f = tflow.tflow(resp=True)
25 assert not d.match(f)
26 f.response.content = b"foo"
27 assert d.match(f)
28
29 ctx.configure(d, dumper_filter=None)
30 assert not d.filter
31 with pytest.raises(exceptions.OptionsError):
32 ctx.configure(d, dumper_filter="~~")
33 assert not d.filter
34
35
36def test_simple():

Callers

nothing calls this directly

Calls 3

matchMethod · 0.95
contextMethod · 0.80
configureMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…