MCPcopy
hub / github.com/mitmproxy/mitmproxy / add

Method add

mitmproxy/addons/view.py:511–523  ·  view source on GitHub ↗

Adds a flow to the state. If the flow already exists, it is ignored.

(self, flows: Sequence[mitmproxy.flow.Flow])

Source from the content-addressed store, hash-verified

509 logging.error(str(e))
510
511 def add(self, flows: Sequence[mitmproxy.flow.Flow]) -> None:
512 """
513 Adds a flow to the state. If the flow already exists, it is
514 ignored.
515 """
516 for f in flows:
517 if f.id not in self._store:
518 self._store[f.id] = f
519 if self.filter(f):
520 self._base_add(f)
521 if self.focus_follow:
522 self.focus.flow = f
523 self.sig_view_add.send(flow=f)
524
525 def get_by_id(self, flow_id: str) -> mitmproxy.flow.Flow | None:
526 """

Callers 15

test_cut_clipFunction · 0.95
test_cut_saveFunction · 0.95
test_cut_save_openFunction · 0.95
test_order_refreshFunction · 0.95
test_movementFunction · 0.95
test_duplicateFunction · 0.95
test_removeFunction · 0.95
test_setgetvalFunction · 0.95
test_signalsFunction · 0.95
test_focus_followFunction · 0.95
test_focusFunction · 0.95
test_settingsFunction · 0.95

Calls 3

_base_addMethod · 0.95
filterMethod · 0.45
sendMethod · 0.45

Tested by 12

test_cut_clipFunction · 0.76
test_cut_saveFunction · 0.76
test_cut_save_openFunction · 0.76
test_order_refreshFunction · 0.76
test_movementFunction · 0.76
test_duplicateFunction · 0.76
test_removeFunction · 0.76
test_setgetvalFunction · 0.76
test_signalsFunction · 0.76
test_focus_followFunction · 0.76
test_focusFunction · 0.76
test_settingsFunction · 0.76