summaryrefslogtreecommitdiff
path: root/tests/test_websupport.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_websupport.py')
-rw-r--r--tests/test_websupport.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/test_websupport.py b/tests/test_websupport.py
index e9c68cf63..2db29a2e1 100644
--- a/tests/test_websupport.py
+++ b/tests/test_websupport.py
@@ -81,8 +81,14 @@ def test_comments(support):
comment = support.add_comment('First test comment',
node_id=str(first_node.id),
username='user_one')
- support.add_comment('Hidden comment', node_id=str(first_node.id),
- displayed=False)
+ hidden_comment = support.add_comment('Hidden comment',
+ node_id=str(first_node.id),
+ displayed=False)
+ # Make sure that comments can't be added to a comment where
+ # displayed == False, since it could break the algorithm that
+ # converts a nodes comments to a tree.
+ raises(CommentNotAllowedError, support.add_comment, 'Not allowed',
+ parent_id=str(hidden_comment['id']))
# Add a displayed and not displayed child to the displayed comment.
support.add_comment('Child test comment', parent_id=str(comment['id']),
username='user_one')
@@ -144,6 +150,7 @@ def test_voting(support):
comment = data['comments'][0]
assert comment['vote'] == 1, '%s != 1' % comment['vote']
+
@with_support()
def test_proposals(support):
session = Session()