Use len(tuple()) instead of tuple() to make tests pass again.
svn path=/plone.app.discussion/trunk/; revision=44706
This commit is contained in:
parent
093eaa393a
commit
c8cd370fc9
@ -242,7 +242,7 @@ class TestCommentsViewlet(PloneTestCase):
|
||||
conversation.addComment(comment)
|
||||
conversation.addComment(comment)
|
||||
replies = self.viewlet.get_replies()
|
||||
self.assertEquals(tuple(replies), 2)
|
||||
self.assertEquals(len(tuple(replies)), 2)
|
||||
replies = self.viewlet.get_replies()
|
||||
replies.next()
|
||||
replies.next()
|
||||
@ -255,7 +255,7 @@ class TestCommentsViewlet(PloneTestCase):
|
||||
conversation = IConversation(self.portal.doc1)
|
||||
c1 = conversation.addComment(comment)
|
||||
self.assertEquals(
|
||||
tuple(self.viewlet.get_replies(workflow_actions=True)), 1)
|
||||
len(tuple(self.viewlet.get_replies(workflow_actions=True))), 1)
|
||||
# Enable moderation workflow
|
||||
self.portal.portal_workflow.setChainForPortalTypes(
|
||||
('Discussion Item',),
|
||||
|
@ -54,7 +54,7 @@ class ConversationTest(PloneTestCase):
|
||||
aq_base(conversation))
|
||||
self.assertEquals(new_id, comment.comment_id)
|
||||
self.assertEquals(len(list(conversation.getComments())), 1)
|
||||
self.assertEquals(tuple(conversation.getThreads()), 1)
|
||||
self.assertEquals(len(tuple(conversation.getThreads())), 1)
|
||||
self.assertEquals(conversation.total_comments, 1)
|
||||
self.assert_(conversation.last_comment_date - datetime.utcnow() <
|
||||
timedelta(seconds=1))
|
||||
@ -75,7 +75,7 @@ class ConversationTest(PloneTestCase):
|
||||
|
||||
# make sure the comment has been added
|
||||
self.assertEquals(len(list(conversation.getComments())), 1)
|
||||
self.assertEquals(tuple(conversation.getThreads()), 1)
|
||||
self.assertEquals(len(tuple(conversation.getThreads())), 1)
|
||||
self.assertEquals(conversation.total_comments, 1)
|
||||
|
||||
# delete the comment we just created
|
||||
@ -83,7 +83,7 @@ class ConversationTest(PloneTestCase):
|
||||
|
||||
# make sure there is no comment left in the conversation
|
||||
self.assertEquals(len(list(conversation.getComments())), 0)
|
||||
self.assertEquals(tuple(conversation.getThreads()), 0)
|
||||
self.assertEquals(len(tuple(conversation.getThreads())), 0)
|
||||
self.assertEquals(conversation.total_comments, 0)
|
||||
|
||||
def test_delete_recursive(self):
|
||||
@ -165,7 +165,7 @@ class ConversationTest(PloneTestCase):
|
||||
|
||||
# Make sure the comment has been deleted as well
|
||||
self.assertEquals(len(list(conversation.getComments())), 0)
|
||||
self.assertEquals(tuple(conversation.getThreads()), 0)
|
||||
self.assertEquals(len(tuple(conversation.getThreads())), 0)
|
||||
self.assertEquals(conversation.total_comments, 0)
|
||||
|
||||
def test_allow_discussion(self):
|
||||
|
Loading…
Reference in New Issue
Block a user