Esempio n. 1
0
 def test_console_client_init(self):
     arguments = MockArgumentParser()
     client = ConsoleBotClient(arguments)
     self.assertIsNotNone(client)
     self.assertIsNotNone(client.arguments)
     self.assertEqual(client.id, "Console")
     self.assertEqual('ProgramY AIML2.0 Client', client.get_description())
Esempio n. 2
0
 def test_get_question(self):
     arguments = MockArgumentParser()
     client = ConsoleBotClient(arguments)
     self.assertIsNotNone(client)
     context = client.create_client_context("console")
     question = client.get_question(context, input_func=mock_input_func)
     self.assertEqual("Hello", question)
Esempio n. 3
0
 def test_console_client_init(self):
     arguments = MockArgumentParser()
     client = ConsoleBotClient(arguments)
     self.assertIsNotNone(client)
     self.assertIsNotNone(client.arguments)
     self.assertEqual(client.id, "Console")
     self.assertEqual('ProgramY AIML2.0 Console Client', client.get_description())
Esempio n. 4
0
 def test_get_question(self):
     arguments = MockArgumentParser()
     client = ConsoleBotClient(arguments)
     self.assertIsNotNone(client)
     context = client.create_client_context("console")
     question = client.get_question(context, input_func=mock_input_func)
     self.assertEquals("Hello", question)
Esempio n. 5
0
 def __init__(self, argument_parser=None):
     ConsoleBotClient.__init__(self, argument_parser)
     self.question = None
     self.response = ""
     self.get_question_exception = False
     self.process_question_answer_do_nothing = False
     self.process_question_answer_keyboard_interrupt = False
     self.process_question_answer_exception = False
Esempio n. 6
0
 def __init__(self, argument_parser=None):
     ConsoleBotClient.__init__(self, argument_parser)
     self.answer = None
     self.question = None
     self.response = ""
     self.get_question_exception = False
     self.process_question_answer_do_nothing = False
     self.process_question_answer_keyboard_interrupt = False
     self.process_question_answer_exception = False
Esempio n. 7
0
    def __init__(self, config_filename, logging_filename=None):
        self._config_filename = config_filename

        filepath = os.path.dirname(__file__) + os.sep
        if logging_filename is not None:
            self._logging_filename = logging_filename
        else:
            self._logging_filename = filepath + 'basicbot/logging.yaml'

        ConsoleBotClient.__init__(self, "Console")
Esempio n. 8
0
    def test_console_client_init(self):
        arguments = MockArgumentParser()
        client = ConsoleBotClient(arguments)
        self.assertIsNotNone(client)
        self.assertIsNotNone(client.arguments)
        self.assertEqual(client.id, "Console")
        self.assertEqual('ProgramY AIML2.0 Client', client.get_description())

        self.assertTrue(client._render_callback())
        self.assertIsInstance(client.renderer, TextRenderer)
Esempio n. 9
0
    def __init__(self, files={}, defaults=False, logging_filename=None):
        self._files = files
        self._defaults = defaults

        filepath = os.path.dirname(__file__) + os.sep
        if logging_filename is not None:
            self._logging_filename = logging_filename
        else:
            self._logging_filename = filepath + 'basicbot/logging.yaml'

        ConsoleBotClient.__init__(self, "Console")
Esempio n. 10
0
 def __init__(self, config_filename):
     self._config_filename = config_filename
     ConsoleBotClient.__init__(self, "Console")
Esempio n. 11
0
 def __init__(self, argument_parser=None):
     ConsoleBotClient.__init__(self, argument_parser)
Esempio n. 12
0
 def __init__(self, defaults_qandas, argument_parser=None):
     ConsoleBotClient.__init__(self, argument_parser)
     self._qandas = []
     self.load_qandas(defaults_qandas)
Esempio n. 13
0
 def __init__(self, argument_parser=None):
     ConsoleBotClient.__init__(self, argument_parser)