From 6ee480a229d6e8eda3bad1bae8a797c93beb7bcf Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Mon, 3 Mar 2014 15:09:30 +0100 Subject: [PATCH] fixed edit test --- plone/app/discussion/tests/test_comments_viewlet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plone/app/discussion/tests/test_comments_viewlet.py b/plone/app/discussion/tests/test_comments_viewlet.py index a12d909..275f3b9 100644 --- a/plone/app/discussion/tests/test_comments_viewlet.py +++ b/plone/app/discussion/tests/test_comments_viewlet.py @@ -127,7 +127,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={}): @@ -186,11 +186,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)