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")
评论列表
文章目录