MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / test_kill

Method test_kill

test/mitmproxy/tools/web/test_app.py:173–183  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

171 assert all(not f.intercepted for f in self.view)
172
173 def test_kill(self):
174 for f in self.view:
175 f.backup()
176 f.intercept()
177
178 assert self.fetch("/flows/42/kill", method="POST").code == 200
179 assert sum(f.killable for f in self.view) >= 1
180 assert self.fetch("/flows/kill", method="POST").code == 200
181 assert all(not f.killable for f in self.view)
182 for f in self.view:
183 f.revert()
184
185 def test_flow_delete(self):
186 f = self.view.get_by_id("42")

Callers

nothing calls this directly

Calls 4

fetchMethod · 0.95
backupMethod · 0.80
interceptMethod · 0.45
revertMethod · 0.45

Tested by

no test coverage detected