fixed edit test
This commit is contained in:
parent
3711d2fb5f
commit
fd16144b9b
@ -142,7 +142,7 @@ class TestCommentForm(unittest.TestCase):
|
||||
"""
|
||||
|
||||
# Allow discussion
|
||||
self.discussionTool.overrideDiscussionFor(self.portal.doc1, True)
|
||||
self.portal.doc1.allow_discussion = True
|
||||
self.viewlet = CommentsViewlet(self.context, self.request, None, None)
|
||||
|
||||
def make_request(form={}):
|
||||
@ -201,11 +201,11 @@ class TestCommentForm(unittest.TestCase):
|
||||
self.assertEqual(len(comments), 1)
|
||||
|
||||
for comment in comments:
|
||||
self.assertEqual(comment.text, u"bar")
|
||||
self.assertEqual(comment.text, u"foobar")
|
||||
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)
|
||||
self.assertEqual(len(local_roles), 2)
|
||||
userid, roles = local_roles[0]
|
||||
self.assertEqual(userid, 'test-user')
|
||||
self.assertEqual(len(roles), 1)
|
||||
|
Loading…
Reference in New Issue
Block a user