From d4cfbbb822f786b7e1f0ab9282dd76ee04ccb178 Mon Sep 17 00:00:00 2001 From: Nicolas Esteves Date: Sat, 6 Apr 2013 19:18:12 +0100 Subject: 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/ --- test/test_console_contentview.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/test_console_contentview.py') 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") -- cgit v1.2.3