aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_console_contentview.py
diff options
context:
space:
mode:
authorNicolas Esteves <hamstahguru@gmail.com>2013-04-06 19:18:12 +0100
committerNicolas Esteves <hamstahguru@gmail.com>2013-04-06 19:21:13 +0100
commitd4cfbbb822f786b7e1f0ab9282dd76ee04ccb178 (patch)
tree2f810bf703379223be5994ce6f0c3c06e9f5bd39 /test/test_console_contentview.py
parent51b775cfd4165ed80dcb5458ddff942125fcba31 (diff)
downloadmitmproxy-d4cfbbb822f786b7e1f0ab9282dd76ee04ccb178.tar.gz
mitmproxy-d4cfbbb822f786b7e1f0ab9282dd76ee04ccb178.tar.bz2
mitmproxy-d4cfbbb822f786b7e1f0ab9282dd76ee04ccb178.zip
Adds a new view for protocol buffers
The view uses protoc from the Google protocol buffer tools. If the tool isn't installed, the view isn't shown. Google protobuf repo: https://code.google.com/p/protobuf/
Diffstat (limited to 'test/test_console_contentview.py')
-rw-r--r--test/test_console_contentview.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_console_contentview.py b/test/test_console_contentview.py
index 77178842..1798ce85 100644
--- a/test/test_console_contentview.py
+++ b/test/test_console_contentview.py
@@ -234,6 +234,14 @@ if pyamf:
p = tutils.test_data.path("data/amf03")
assert v([], file(p).read(), sys.maxint)
+if cv.ViewProtobuf.is_available():
+ def test_view_protobuf_request():
+ v = cv.ViewProtobuf()
+
+ p = tutils.test_data.path("data/protobuf01")
+ content_type, output = v([], file(p).read(), sys.maxint)
+ assert content_type == "Protobuf"
+ assert output[0].text == '1: "3bbc333c-e61c-433b-819a-0b9a8cc103b8"'
def test_get_by_shortcut():
assert cv.get_by_shortcut("h")