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

Method test_custom_contentviews

test/examples/test_examples.py:16–21  ·  view source on GitHub ↗
(self, tdata)

Source from the content-addressed store, hash-verified

14 assert f.request.headers["myheader"] == "value"
15
16 def test_custom_contentviews(self, tdata):
17 with taddons.context() as tctx:
18 tctx.script(tdata.path("../examples/addons/contentview.py"))
19 swapcase = contentviews.registry["swapcase"]
20 result = swapcase.prettify(b"<html>Test!</html>", contentviews.Metadata())
21 assert "tEST!" in result
22
23 def test_modify_form(self, tdata):
24 with taddons.context() as tctx:

Callers

nothing calls this directly

Calls 4

contextMethod · 0.80
scriptMethod · 0.80
pathMethod · 0.45
prettifyMethod · 0.45

Tested by

no test coverage detected