From b70e91bbd4548d95429db6a7830c988d334e9990 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sat, 18 Aug 2012 17:42:40 +1200 Subject: Send tracebacks from content viewers to event log. Also, 100% test coverage for content viewers. --- test/test_console_contentview.py | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'test/test_console_contentview.py') diff --git a/test/test_console_contentview.py b/test/test_console_contentview.py index d2ab72dc..4ebef95b 100644 --- a/test/test_console_contentview.py +++ b/test/test_console_contentview.py @@ -160,7 +160,8 @@ Larry cv.get("Raw"), [["content-type", "application/json"]], "[1, 2, 3]", - 1000 + 1000, + lambda x: None ) assert "Raw" in r[0] @@ -168,7 +169,8 @@ Larry cv.get("Auto"), [["content-type", "application/json"]], "[1, 2, 3]", - 1000 + 1000, + lambda x: None ) assert r[0] == "JSON" @@ -176,10 +178,21 @@ Larry cv.get("Auto"), [["content-type", "application/json"]], "[1, 2", - 1000 + 1000, + lambda x: None ) assert "Raw" in r[0] + r = cv.get_content_view( + cv.get("AMF"), + [], + "[1, 2", + 1000, + lambda x: None + ) + assert "Raw" in r[0] + + r = cv.get_content_view( cv.get("Auto"), [ @@ -187,7 +200,8 @@ Larry ["content-encoding", "gzip"] ], encoding.encode('gzip', "[1, 2, 3]"), - 1000 + 1000, + lambda x: None ) assert "decoded gzip" in r[0] assert "JSON" in r[0] @@ -199,7 +213,8 @@ Larry ["content-encoding", "gzip"] ], encoding.encode('gzip', "[1, 2, 3]"), - 1000 + 1000, + lambda x: None ) assert "decoded gzip" in r[0] assert "Raw" in r[0] -- cgit v1.2.3