test_Inlinequerygenerator.py 文件源码

python
阅读 16 收藏 0 点赞 0 评论 0

项目:ptbtest 作者: Eldinnie 项目源码 文件源码
def test_standard(self):
        u = self.iqg.get_inline_query()
        self.assertIsInstance(u, Update)
        self.assertIsInstance(u.inline_query, InlineQuery)
        self.assertIsInstance(u.inline_query.from_user, User)

        bot = Mockbot(username="testbot")
        iqg2 = InlineQueryGenerator(bot=bot)
        self.assertEqual(bot.username, iqg2.bot.username)

        with self.assertRaises(BadBotException):
            iqg3 = InlineQueryGenerator(bot="bot")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号