rebased branch from master

This commit is contained in:
Andrea Cecchi 2014-02-04 11:35:20 +01:00
parent 520b1e83f4
commit 3711d2fb5f
2 changed files with 17 additions and 0 deletions

View File

@ -100,6 +100,8 @@ Changelog
[toutpt]
=======
>>>>>>> rebased branch from master
2.2.10 (2013-09-24)
-------------------

View File

@ -196,6 +196,21 @@ class TestCommentForm(unittest.TestCase):
comment = [x for x in conversation.getComments()][-1]
self.assertEquals(comment.text, u"foobar")
comments = IConversation(commentForm.context).getComments()
comments = [comment for comment in comments] # consume itertor
self.assertEqual(len(comments), 1)
for comment in comments:
self.assertEqual(comment.text, u"bar")
self.assertEqual(comment.creator, "test-user")
self.assertEqual(comment.getOwner().getUserName(), "test-user")
local_roles = comment.get_local_roles()
self.assertEqual(len(local_roles), 1)
userid, roles = local_roles[0]
self.assertEqual(userid, 'test-user')
self.assertEqual(len(roles), 1)
self.assertEqual(roles[0], 'Owner')
def test_add_anonymous_comment(self):
self.portal.doc1.allow_discussion = True