MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_context

Function test_context

test/mitmproxy/proxy/test_context.py:6–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5
6def test_context():
7 with taddons.context() as tctx:
8 c = context.Context(tflow.tclient_conn(), tctx.options)
9 assert repr(c)
10 c.layers.append(1)
11 assert repr(c)
12 c2 = c.fork()
13 c.layers.append(2)
14 c2.layers.append(3)
15 assert c.layers == [1, 2]
16 assert c2.layers == [1, 3]

Callers

nothing calls this directly

Calls 3

forkMethod · 0.95
contextMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…