total_comments only counts published comments

Also migrate workflow state during migration.
This commit is contained in:
Paul J Stevens
2012-06-13 11:17:22 +00:00
parent 5e08d3a33e
commit 53428fe5f6
6 changed files with 76 additions and 7 deletions
@@ -171,7 +171,7 @@ class ModerationBulkActionsViewTest(unittest.TestCase):
def test_delete(self):
# Initially we have three comments
self.assertEqual(self.conversation.total_comments, 3)
self.assertEqual(len(self.conversation.objectIds()), 3)
# Delete two comments with bulk actions
self.request.set('form.select.BulkAction', 'delete')
self.request.set('paths', ['/'.join(self.comment1.getPhysicalPath()),
@@ -181,7 +181,7 @@ class ModerationBulkActionsViewTest(unittest.TestCase):
view()
# Make sure that the two comments have been deleted
self.assertEqual(self.conversation.total_comments, 1)
self.assertEqual(len(self.conversation.objectIds()), 1)
comment = self.conversation.getComments().next()
self.assertTrue(comment)
self.assertEqual(comment, self.comment2)