Beispiel #1
0
    def test_get_question(self):
        arguments = MockArgumentParser()
        client = FlaskRestBotClient("flask", arguments)
        self.assertIsNotNone(client)

        request = unittest.mock.Mock()
        request.data = b'{"userId": "1234567890", "utterance": "Hello"}'

        self.assertEqual("Hello", client.get_question(request))
Beispiel #2
0
    def test_get_question(self):
        arguments = MockArgumentParser()
        client = FlaskRestBotClient("flask", arguments)
        self.assertIsNotNone(client)

        request = unittest.mock.Mock()
        request.args = {}
        request.args['question'] = 'Hello'

        self.assertEqual("Hello", client.get_question(request))
Beispiel #3
0
    def test_get_question(self):
        arguments = MockArgumentParser()
        client = FlaskRestBotClient("flask", arguments)
        self.assertIsNotNone(client)

        request = unittest.mock.Mock()
        request.args = {}
        request.args['question'] = 'Hello'

        self.assertEquals("Hello", client.get_question(request))