diff --git a/test/mitmproxy/test_examples.py b/test/mitmproxy/test_examples.py index c7fa90c84..5d1a18ed7 100644 --- a/test/mitmproxy/test_examples.py +++ b/test/mitmproxy/test_examples.py @@ -8,6 +8,7 @@ from . import tservers, tutils from examples import ( add_header, + custom_contentviews, modify_form, modify_querystring, modify_response_body, @@ -72,4 +73,11 @@ def test_modify_response_body(): flow = tutils.tflow(resp=netutils.tresp(content="I <3 mitmproxy")) modify_response_body.response(ctx, flow) - assert flow.response.content == "I <3 rocks" \ No newline at end of file + assert flow.response.content == "I <3 rocks" + + +def test_custom_contentviews(): + pig = custom_contentviews.ViewPigLatin() + _, fmt = pig("test!") + assert any('esttay!' in val[0][1] for val in fmt) + assert not pig("gobbledygook")