def test_bot_init_with_config(self): test_brain = Brain(BrainConfiguration()) bot_config = BotConfiguration() bot_config._license_keys = None bot_config._bot_root = BotConfiguration.DEFAULT_ROOT bot_config._prompt = BotConfiguration.DEFAULT_PROMPT bot_config._default_response = BotConfiguration.DEFAULT_RESPONSE bot_config._exit_response = BotConfiguration.DEFAULT_EXIT_RESPONSE bot_config._initial_question = BotConfiguration.DEFAULT_INITIAL_QUESTION bot_config._empty_string = BotConfiguration.DEFAULT_EMPTY_STRING bot_config._override_predicates = BotConfiguration.DEFAULT_OVERRIDE_PREDICATES bot_config._max_recursion = 10 bot = Bot(test_brain, bot_config) self.assertIsNone(bot.spell_checker) self.assertIsNotNone(bot.brain) self.assertIsNotNone(bot.conversations) self.assertIsNotNone(bot.license_keys) self.assertIsNotNone(bot.prompt) self.assertIsNotNone(bot.default_response) self.assertIsNotNone(bot.exit_response) self.assertIsNotNone(bot.initial_question) self.assertTrue(bot.override_predicates) self.assertIsNotNone(bot.get_version_string)
def test_bot_init_with_license_keys(self): test_brain = Brain(BrainConfiguration()) bot_config = BotConfiguration() bot_config._license_keys = os.path.dirname( __file__) + os.sep + "test_license.keys" bot = Bot(test_brain, bot_config) self.assertIsNotNone(bot)
def test_bot_init_no_license_keys(self): test_brain = Brain(BrainConfiguration()) bot_config = BotConfiguration() bot_config._license_keys = None bot = Bot(test_brain, bot_config) self.assertIsNotNone(bot)