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

Function test_get

test/mitmproxy/contentviews/test__compat.py:48–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46
47
48def test_get():
49 mock_view = MockView()
50 # Test with existing view
51 with mock.patch("mitmproxy.contentviews.registry", {"mock": mock_view}):
52 with pytest.deprecated_call():
53 view = _compat.get("mock")
54 assert view == mock_view
55
56 # Test with non-existent view
57 with mock.patch("mitmproxy.contentviews.registry", {}):
58 with pytest.deprecated_call():
59 view = _compat.get("nonexistent")
60 assert view is None
61
62
63def test_remove():

Callers

nothing calls this directly

Calls 2

MockViewClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…