コード例 #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")