aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_console_contentview.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_console_contentview.py')
-rw-r--r--test/test_console_contentview.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/test_console_contentview.py b/test/test_console_contentview.py
index 8a5dabb8..1798ce85 100644
--- a/test/test_console_contentview.py
+++ b/test/test_console_contentview.py
@@ -58,7 +58,9 @@ class TestContentView:
d = utils.urlencode([("one", "two"), ("three", "four")])
v = cv.ViewURLEncoded()
assert v([], d, 100)
- assert not v([], "foo", 100)
+ d = utils.urlencode([("adsfa", "")])
+ v = cv.ViewURLEncoded()
+ assert v([], d, 100)
def test_view_html(self):
v = cv.ViewHTML()
@@ -232,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")