Beispiel #1
0
 def setUp(self):
     HttpRasa.make_continue_request('utter_change_location', 'test',
                                    'restart')
     HttpRasa.make_continue_request_with_set_slot('utter_change_location',
                                                  'test', 'welcomeform_end',
                                                  True)
     print('')
Beispiel #2
0
    def simulate_flow(self, parse_word, parse_action, continue_actions):
        json_result = HttpRasa.make_parse_request_from_text(parse_word, 'test')
        json_next_action = JsonRasaParser.get_next_action_from_response(
            json_result)

        print('From phrase: ' + parse_word)
        print('expected action: ' + parse_action)
        print('real action: ' + json_next_action)
        self.assertEqual(parse_action, json_next_action)

        next_action = parse_action
        for continue_action in continue_actions:
            json_result = HttpRasa.make_continue_request(next_action, 'test')
            next_action = JsonRasaParser.get_next_action_from_response(
                json_result)

            self.assertEqual(continue_action, next_action)
Beispiel #3
0
 def setUpClass(cls):
     cls.csv_file.write(
         'Message; Confidence factor; Diff CF; Second intent \n')
     HttpRasa.make_continue_request('utter_change_location', 'test',
                                    'restart')