mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-29 09:40:31 +01:00
Move old tests to legacy dir until get new ones written
This commit is contained in:
parent
e1edeb7bec
commit
36dc1633f5
2 changed files with 1 additions and 25 deletions
|
@ -51,7 +51,7 @@ class BotTest(unittest.TestCase):
|
||||||
bot = self._bot.getMe()
|
bot = self._bot.getMe()
|
||||||
|
|
||||||
self.assertTrue(self.is_json(bot.to_json()))
|
self.assertTrue(self.is_json(bot.to_json()))
|
||||||
self.assertEqual(bot.id, 120405045)
|
self.assertEqual(bot.id, 133505823)
|
||||||
self.assertEqual(bot.first_name, 'Toledo\'s Palace Bot')
|
self.assertEqual(bot.first_name, 'Toledo\'s Palace Bot')
|
||||||
self.assertEqual(bot.last_name, '')
|
self.assertEqual(bot.last_name, '')
|
||||||
self.assertEqual(bot.username, 'ToledosPalaceBot')
|
self.assertEqual(bot.username, 'ToledosPalaceBot')
|
||||||
|
@ -135,30 +135,6 @@ class BotTest(unittest.TestCase):
|
||||||
self.assertTrue(self.is_json(message.to_json()))
|
self.assertTrue(self.is_json(message.to_json()))
|
||||||
self.assertEqual(message.photo[0].file_size, 684)
|
self.assertEqual(message.photo[0].file_size, 684)
|
||||||
|
|
||||||
def testSendAudio(self):
|
|
||||||
'''Test the telegram.Bot sendAudio method'''
|
|
||||||
print('Testing sendAudio - File')
|
|
||||||
message = self._bot.sendAudio(audio=open('tests/data/telegram.mp3', 'rb'),
|
|
||||||
chat_id=self._chat_id,
|
|
||||||
performer='Leandro Toledo',
|
|
||||||
title='Teste')
|
|
||||||
|
|
||||||
self.assertTrue(self.is_json(message.to_json()))
|
|
||||||
self.assertEqual(message.audio.file_size, 28232)
|
|
||||||
self.assertEqual(message.audio.performer, 'Leandro Toledo')
|
|
||||||
self.assertEqual(message.audio.title, 'Teste')
|
|
||||||
|
|
||||||
def testResendAudio(self):
|
|
||||||
'''Test the telegram.Bot sendAudio method'''
|
|
||||||
print('Testing sendAudio - Resend')
|
|
||||||
message = self._bot.sendAudio(audio='BQADAQADwwcAAjU8LQdBRsl3_qD2TAI',
|
|
||||||
chat_id=self._chat_id,
|
|
||||||
performer='Leandro Toledo', # Bug #39
|
|
||||||
title='Teste') # Bug #39
|
|
||||||
|
|
||||||
self.assertTrue(self.is_json(message.to_json()))
|
|
||||||
self.assertEqual(message.audio.file_id, 'BQADAQADwwcAAjU8LQdBRsl3_qD2TAI')
|
|
||||||
|
|
||||||
def testSendVoice(self):
|
def testSendVoice(self):
|
||||||
'''Test the telegram.Bot sendVoice method'''
|
'''Test the telegram.Bot sendVoice method'''
|
||||||
print('Testing sendVoice - File')
|
print('Testing sendVoice - File')
|
Loading…
Add table
Reference in a new issue