Beispiel #1
0
 def testGetLastComment(self):
     res = Results()
     res.addComment("Escola Santa Clara","Didier",'manchete','this is a comment')
     time.sleep(1)#because otherwise the 2comments would be saved with same date!
     res.addComment("Escola Santa Clara","Didier",'manchete','this is my last comment')
     res.addComment("Escola Santa Clara","Didier",'noticia','this is my last comment for noticia')
     self.assertEquals(res.getLastComment("Escola Santa Clara","Didier",'manchete'),'this is my last comment')
     self.assertNotEquals(res.getLastComment("Escola Santa Clara","Didier",'manchete'),'this is a comment')
     self.assertEquals(res.getLastComment("Escola Santa Clara","Didier",'noticia'),'this is my last comment for noticia')
Beispiel #2
0
 def testAddComment(self):
     res = Results()
     self.assertTrue(res.addComment("Escola Santa Clara","Didier",'manchete','this is my comment'),True)