Exemplo n.º 1
0
    def test_get_first_response(self):
        statement_list = [
            Statement('What... is your quest?'),
            Statement('A what?'),
            Statement('A quest.')
        ]

        output = response_selection.get_first_response(Statement('Hello'), statement_list)

        self.assertEqual('What... is your quest?', output)
    def test_get_first_response(self):
        statement_list = [
            Statement(text='What... is your quest?'),
            Statement(text='A what?'),
            Statement(text='A quest.')
        ]

        output = response_selection.get_first_response(Statement(text='Hello'), statement_list)

        self.assertEqual(output.text, 'What... is your quest?')
Exemplo n.º 3
0
Arquivo: bot.py Projeto: Palkovsky/msi
def selector(input_statement, response_list, storage=None):
    return get_first_response(input_statement, response_list, storage=storage)