MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_clear

Method test_clear

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

Source from the content-addressed store, hash-verified

148 assert resp.code == 400
149
150 def test_clear(self):
151 events = self.events.data.copy()
152 flows = list(self.view)
153
154 assert self.fetch("/clear", method="POST").code == 200
155
156 assert not len(self.view)
157 assert not len(self.events.data)
158
159 # restore
160 for f in flows:
161 self.view.add([f])
162 self.events.data = events
163
164 def test_resume(self):
165 for f in self.view:

Callers

nothing calls this directly

Calls 3

fetchMethod · 0.95
copyMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected