def testGetsAllMessages(self): interface.cmd("Dame la hora") interface.cmd("Dame la hora") messages = interface.get_all_msg() print messages self.assertEqual(4, len(messages), "There should be four messages, were " + str(len(messages)))
def testSetTodo(self): interface.cmd("Tengo que matar a flanders") interface.get_new_msg() # me resultan irrelevantes interface.cmd("Que tengo que hacer?") messages = interface.get_new_msg() print [e.message for e in messages]
def testSaysHi(self): interface.cmd("Hola") messages = interface.get_new_msg() #print [m.message for m in messages] self.assertEqual(2, len(messages), "It should have two messages, were " + str(len(messages))) self.assertTrue("hola" in messages [1].message.lower(), "Should say hi")