aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_contentview.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_contentview.py')
-rw-r--r--test/test_contentview.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/test/test_contentview.py b/test/test_contentview.py
index 97608520..2a70b414 100644
--- a/test/test_contentview.py
+++ b/test/test_contentview.py
@@ -210,6 +210,21 @@ Larry
assert "decoded gzip" in r[0]
assert "Raw" in r[0]
+ def test_add_cv(self):
+ class TestContentView(cv.View):
+ name = "test"
+ prompt = ("t", "test")
+
+ tcv = TestContentView()
+ cv.add(tcv)
+
+ # repeated addition causes exception
+ tutils.raises(
+ ContentViewException,
+ cv.add,
+ tcv
+ )
+
if pyamf:
def test_view_amf_request():
@@ -233,7 +248,7 @@ if cv.ViewProtobuf.is_available():
p = tutils.test_data.path("data/protobuf01")
content_type, output = v(file(p, "rb").read())
assert content_type == "Protobuf"
- assert output[0].text == '1: "3bbc333c-e61c-433b-819a-0b9a8cc103b8"'
+ assert output.next()[0][1] == '1: "3bbc333c-e61c-433b-819a-0b9a8cc103b8"'
def test_get_by_shortcut():