def testGetInfo(self): bot = TelegramBot('FAKE-TOKEN') info = Mock() bot.telegramBot = Mock() bot.telegramBot.getMe = Mock(return_value=info) infoResult = bot.getInfo() self.assertEqual(infoResult, info)
def testGetInfo(self): bot = TelegramBot(self.token) info = bot.getInfo() self.assertTrue(info.id) self.assertTrue(info.username) self.assertTrue(info.first_name)