Exemplo n.º 1
0
 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)))
Exemplo n.º 2
0
 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]
Exemplo n.º 3
0
 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")