예제 #1
0
 def test_not_command(self):
     response = app.parseWithChatty("TestUser" + ",.," + '!! Potato',"")
     self.assertEquals(response, None)
예제 #2
0
 def test_is_command(self):
     response = app.parseWithChatty("TestUser" + ",.," + '!! help',"")
     self.assertNotEqual(response, None)
예제 #3
0
 def test_exit_command(self):
     response = app.parseWithChatty("TestUser" + ",.," + '<< TestUser',"")
     self.assertEquals(response["text"], "Everyone say goodbye to TestUser!")
예제 #4
0
 def test_enter_command(self):
     response = app.parseWithChatty("TestUser" + ",.," + '>> TestUser',"")
     self.assertEquals(response["text"], "Welcome TestUser! Type !!help for a list of commands!")
예제 #5
0
 def test_say_invalidArgs_command(self):
     response = app.parseWithChatty("TestUser" + ",.," + '!! say',"")
     self.assertEquals(response, None)
예제 #6
0
 def test_saySpecial_command(self):
     response = app.parseWithChatty("TestUser" + ",.," + '!! saySpecial \thello\nworld',"")
     self.assertEquals(response["text"], "TestUser says\n")
예제 #7
0
 def test_say_command(self):
     response = app.parseWithChatty("TestUser" + ",.," + '!! say hello',"")
     self.assertEquals(response["text"], "TestUser says hello")