Beispiel #1
0
    def test_get_default_response_empty_string(self):

        bot_config = BotConfiguration()
        self.assertIsNotNone(bot_config)

        bot = Bot(bot_config)
        self.assertIsNotNone(bot)

        self.assertEquals("", bot.get_default_response(self._client_context))
Beispiel #2
0
    def test_get_default_response_default_response_only(self):

        bot_config = BotConfiguration()
        self.assertIsNotNone(bot_config)

        bot_config.default_response = "Default response!"

        bot = Bot(bot_config)
        self.assertIsNotNone(bot)

        self.assertEquals("Default response!", bot.get_default_response(self._client_context))
Beispiel #3
0
    def test_get_default_response_default_response_srai_no_match(self):

        bot_config = BotConfiguration()
        self.assertIsNotNone(bot_config)

        bot_config.default_response_srai = "YDEFAULTRESPONSE"
        bot_config.default_response = "Default response!"

        bot = Bot(bot_config)
        self.assertIsNotNone(bot)

        self.assertEquals("Default response!", bot.get_default_response(self._client_context))