def test_description(self): self.assertEqual( catalog.description(self.comment)(), 'Lorem ipsum dolor sit amet.' ) self.assertTrue( isinstance(catalog.description, DelegatingIndexerFactory))
def test_description(self): self.assertEqual( catalog.description(self.comment)(), 'Lorem ipsum dolor sit amet.', ) self.assertTrue( isinstance(catalog.description, DelegatingIndexerFactory))
def test_description_long(self): # Create a 50 word comment and make sure the description returns # only the first 25 words comment_long = createObject('plone.Comment') comment_long.title = 'Long Comment' comment_long.text = LONG_TEXT self.conversation.addComment(comment_long) self.assertEqual(catalog.description(comment_long)(), LONG_TEXT_CUT.replace("\n", " "))
def test_description_long(self): # Create a 50 word comment and make sure the description returns # only the first 25 words comment_long = createObject('plone.Comment') comment_long.title = 'Long Comment' comment_long.text = LONG_TEXT self.conversation.addComment(comment_long) self.assertEqual( catalog.description(comment_long)(), LONG_TEXT_CUT.replace("\n", " "))