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