def test_get_exit_response_empty_string(self): bot_config = BotConfiguration() self.assertIsNotNone(bot_config) bot = Bot(bot_config) self.assertIsNotNone(bot) self.assertEquals("Bye!", bot.get_exit_response(self._client_context))
def test_get_exit_response_empty_string(self): bot_config = BotConfiguration() self.assertIsNotNone(bot_config) bot = Bot(bot_config) self.assertIsNotNone(bot) self.assertEquals("Bye!", bot.get_exit_response(self._client_context))
def test_get_exit_response_exit_response_only(self): bot_config = BotConfiguration() self.assertIsNotNone(bot_config) bot_config.exit_response = "Default response!" bot = Bot(bot_config) self.assertIsNotNone(bot) self.assertEquals("Default response!", bot.get_exit_response(self._client_context))
def test_get_exit_response_exit_response_only(self): bot_config = BotConfiguration() self.assertIsNotNone(bot_config) bot_config.exit_response = "Default response!" bot = Bot(bot_config) self.assertIsNotNone(bot) self.assertEquals("Default response!", bot.get_exit_response(self._client_context))
def test_get_exit_response_empty_string(self): brain_config = BrainConfiguration() self.assertIsNotNone(brain_config) test_brain = Brain(brain_config) self.assertIsNotNone(test_brain) bot_config = BotConfiguration() self.assertIsNotNone(bot_config) bot = Bot(test_brain, bot_config) self.assertIsNotNone(bot) self.assertEquals("Bye!", bot.get_exit_response("testid"))
def test_get_exit_response_exit_response_srai_no_match(self): bot_config = BotConfiguration() self.assertIsNotNone(bot_config) bot_config.exit_response_srai = "YDEFAULTRESPONSE" bot_config.exit_response = "Default response!" bot = Bot(bot_config) self.assertIsNotNone(bot) self.assertEquals("Default response!", bot.get_exit_response(self._client_context))
def test_get_exit_response_exit_response_srai_no_match(self): bot_config = BotConfiguration() self.assertIsNotNone(bot_config) bot_config.exit_response_srai = "YDEFAULTRESPONSE" bot_config.exit_response = "Default response!" bot = Bot(bot_config) self.assertIsNotNone(bot) self.assertEquals("Default response!", bot.get_exit_response(self._client_context))
def test_get_exit_response_exit_response_srai_none(self): bot_config = BotConfiguration() self.assertIsNotNone(bot_config) bot_config.exit_response_srai = None bot_config.exit_response = "Default response!" client = TestClient() bot = Bot(bot_config, client) self.assertIsNotNone(bot) self.assertEqual("Default response!", bot.get_exit_response(self._client_context))
def test_get_exit_response_no_srai(self): bot_config = BotConfiguration() bot_config._exit_response = "Test This" bot_config._exit_response_srai = None self.assertIsNotNone(bot_config) client = TestClient() bot = Bot(bot_config, client) self.assertIsNotNone(bot) self.assertEqual("Test This", bot.get_exit_response(self._client_context))
def test_get_exit_response_exit_response_only(self): brain_config = BrainConfiguration() self.assertIsNotNone(brain_config) test_brain = Brain(brain_config) self.assertIsNotNone(test_brain) bot_config = BotConfiguration() self.assertIsNotNone(bot_config) bot_config.exit_response = "Default response!" bot = Bot(test_brain, bot_config) self.assertIsNotNone(bot) self.assertEquals("Default response!", bot.get_exit_response("testid"))
def test_get_exit_response_exit_response_srai_no_match(self): brain_config = BrainConfiguration() self.assertIsNotNone(brain_config) test_brain = Brain(brain_config) self.assertIsNotNone(test_brain) bot_config = BotConfiguration() self.assertIsNotNone(bot_config) bot_config.exit_response_srai = "YDEFAULTRESPONSE" bot_config.exit_response = "Default response!" bot = Bot(test_brain, bot_config) self.assertIsNotNone(bot) self.assertEquals("Default response!", bot.get_exit_response("testid"))