Пример #1
0
    def test_get_userid(self):
        arguments = MockArgumentParser()
        client = FlaskRestBotClient("flask", arguments)
        self.assertIsNotNone(client)

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

        self.assertEqual("1234567890", client.get_userid(request))
Пример #2
0
    def test_get_userid(self):
        arguments = MockArgumentParser()
        client = FlaskRestBotClient("flask", arguments)
        self.assertIsNotNone(client)

        request = unittest.mock.Mock()
        request.args = {}
        request.args['userid'] = '1234567890'

        self.assertEqual("1234567890", client.get_userid(request))
Пример #3
0
    def test_get_userid(self):
        arguments = MockArgumentParser()
        client = FlaskRestBotClient("flask", arguments)
        self.assertIsNotNone(client)

        request = unittest.mock.Mock()
        request.args = {}
        request.args['userid'] = '1234567890'

        self.assertEquals("1234567890", client.get_userid(request))