From afb07e5f0b02f4c863c5d88ce946f2e162070372 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Wed, 20 May 2009 16:07:29 +0000 Subject: [PATCH] test conversation.total_comments instead of len(conversation.getComments()) in test_total_comments. svn path=/plone.app.discussion/trunk/; revision=27037 --- plone/app/discussion/tests/test_conversation.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plone/app/discussion/tests/test_conversation.py b/plone/app/discussion/tests/test_conversation.py index 26fa9d3..3e13518 100644 --- a/plone/app/discussion/tests/test_conversation.py +++ b/plone/app/discussion/tests/test_conversation.py @@ -62,8 +62,9 @@ class ConversationTest(PloneTestCase): # Pretend that we have traversed to the comment by aq wrapping it. conversation = conversation.__of__(self.portal.doc1) - # Add a three comment. Note: in real life, we always create comments via the factory - # to allow different factories to be swapped in + # Add a three comments. Note: in real life, we always create + # comments via the factory to allow different factories to be + # swapped in comment1 = createObject('plone.Comment') comment1.title = 'Comment 1' @@ -81,7 +82,7 @@ class ConversationTest(PloneTestCase): new_comment2_id = conversation.addComment(comment2) new_comment3_id = conversation.addComment(comment3) - self.assertEquals(len(conversation.getComments()), 3) + self.assertEquals(conversation.total_comments, 3) def test_commentators(self): # add and remove a few comments to make sure the commentators @@ -95,7 +96,7 @@ class ConversationTest(PloneTestCase): pass def test_get_comments_batched(self): - pass + pass def test_get_threads(self): pass