rebased branch from master
This commit is contained in:
parent
520b1e83f4
commit
3711d2fb5f
@ -100,6 +100,8 @@ Changelog
|
|||||||
[toutpt]
|
[toutpt]
|
||||||
|
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> rebased branch from master
|
||||||
2.2.10 (2013-09-24)
|
2.2.10 (2013-09-24)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
@ -196,6 +196,21 @@ class TestCommentForm(unittest.TestCase):
|
|||||||
comment = [x for x in conversation.getComments()][-1]
|
comment = [x for x in conversation.getComments()][-1]
|
||||||
self.assertEquals(comment.text, u"foobar")
|
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):
|
def test_add_anonymous_comment(self):
|
||||||
self.portal.doc1.allow_discussion = True
|
self.portal.doc1.allow_discussion = True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user