MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / test_keepserving

Function test_keepserving

test/mitmproxy/addons/test_keepserving.py:41–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39
40
41async def test_keepserving():
42 ks = TKS()
43 d = Dummy(True)
44 with taddons.context(ks) as tctx:
45 tctx.master.addons.add(d)
46 ks.running()
47 assert ks.keepgoing()
48
49 d.val = False
50 assert not ks.keepgoing()
51 await asyncio.sleep(0.3)
52 assert ks.is_shutdown

Callers

nothing calls this directly

Calls 6

TKSClass · 0.85
DummyClass · 0.85
contextMethod · 0.80
keepgoingMethod · 0.80
addMethod · 0.45
runningMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…