MCPcopy
hub / github.com/mitmproxy/mitmproxy / MockView

Class MockView

test/mitmproxy/contentviews/test__compat.py:10–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8with pytest.deprecated_call():
9
10 class MockView(View):
11 def __init__(self, name: str = "mock"):
12 self._name = name
13 self.syntax_highlight = "python"
14
15 def __call__(self, data, content_type=None, flow=None, http_message=None):
16 return "description", [[("text", "content")]]
17
18 @property
19 def name(self) -> str:
20 return self._name
21
22 def render_priority(
23 self, data, content_type=None, flow=None, http_message=None
24 ):
25 return 1.0
26
27
28def test_legacy_contentview():

Callers 3

test_legacy_contentviewFunction · 0.85
test_getFunction · 0.85
test_removeFunction · 0.85

Calls

no outgoing calls

Tested by 3

test_legacy_contentviewFunction · 0.68
test_getFunction · 0.68
test_removeFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…