def test_conversation_total_comments(self): self.assertTrue(isinstance(catalog.total_comments, DelegatingIndexerFactory)) self.assertEqual(catalog.total_comments(self.portal.doc1)(), 3) del self.conversation[self.new_id1] self.assertEqual(catalog.total_comments(self.portal.doc1)(), 2) del self.conversation[self.new_id2] del self.conversation[self.new_id3] self.assertEqual(catalog.total_comments(self.portal.doc1)(), 0)
def test_conversation_total_comments(self): self.assertTrue( isinstance(catalog.total_comments, DelegatingIndexerFactory)) self.assertEqual(catalog.total_comments(self.portal.doc1)(), 3) del self.conversation[self.new_id1] self.assertEqual(catalog.total_comments(self.portal.doc1)(), 2) del self.conversation[self.new_id2] del self.conversation[self.new_id3] self.assertEqual(catalog.total_comments(self.portal.doc1)(), 0)