mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-15 03:58:35 +01:00
Fix tests for Inline Voice Queries
This commit is contained in:
parent
5e2d96b47d
commit
8234321a20
2 changed files with 6 additions and 3 deletions
|
@ -37,7 +37,7 @@ class InlineQueryResultCachedVoiceTest(BaseTest, unittest.TestCase):
|
|||
self.type = 'voice'
|
||||
self.voice_file_id = 'voice file id'
|
||||
self.title = 'title'
|
||||
self.description = 'description'
|
||||
self.caption = 'caption'
|
||||
self.input_message_content = telegram.InputTextMessageContent('input_message_content')
|
||||
self.reply_markup = telegram.InlineKeyboardMarkup([[
|
||||
telegram.InlineKeyboardButton('reply_markup')
|
||||
|
@ -48,7 +48,7 @@ class InlineQueryResultCachedVoiceTest(BaseTest, unittest.TestCase):
|
|||
'id': self.id,
|
||||
'voice_file_id': self.voice_file_id,
|
||||
'title': self.title,
|
||||
'description': self.description,
|
||||
'caption': self.caption,
|
||||
'input_message_content': self.input_message_content.to_dict(),
|
||||
'reply_markup': self.reply_markup.to_dict(),
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ class InlineQueryResultCachedVoiceTest(BaseTest, unittest.TestCase):
|
|||
self.assertEqual(voice.id, self.id)
|
||||
self.assertEqual(voice.voice_file_id, self.voice_file_id)
|
||||
self.assertEqual(voice.title, self.title)
|
||||
self.assertEqual(voice.description, self.description)
|
||||
self.assertEqual(voice.caption, self.caption)
|
||||
self.assertDictEqual(voice.input_message_content.to_dict(),
|
||||
self.input_message_content.to_dict())
|
||||
self.assertDictEqual(voice.reply_markup.to_dict(), self.reply_markup.to_dict())
|
||||
|
|
|
@ -37,6 +37,7 @@ class InlineQueryResultVoiceTest(BaseTest, unittest.TestCase):
|
|||
self.voice_url = 'voice url'
|
||||
self.title = 'title'
|
||||
self.voice_duration = 'voice_duration'
|
||||
self.caption = 'caption'
|
||||
self.input_message_content = telegram.InputTextMessageContent('input_message_content')
|
||||
self.reply_markup = telegram.InlineKeyboardMarkup([[
|
||||
telegram.InlineKeyboardButton('reply_markup')
|
||||
|
@ -48,6 +49,7 @@ class InlineQueryResultVoiceTest(BaseTest, unittest.TestCase):
|
|||
'voice_url': self.voice_url,
|
||||
'title': self.title,
|
||||
'voice_duration': self.voice_duration,
|
||||
'caption': self.caption,
|
||||
'input_message_content': self.input_message_content.to_dict(),
|
||||
'reply_markup': self.reply_markup.to_dict(),
|
||||
}
|
||||
|
@ -60,6 +62,7 @@ class InlineQueryResultVoiceTest(BaseTest, unittest.TestCase):
|
|||
self.assertEqual(voice.voice_url, self.voice_url)
|
||||
self.assertEqual(voice.title, self.title)
|
||||
self.assertEqual(voice.voice_duration, self.voice_duration)
|
||||
self.assertEqual(voice.caption, self.caption)
|
||||
self.assertDictEqual(voice.input_message_content.to_dict(),
|
||||
self.input_message_content.to_dict())
|
||||
self.assertDictEqual(voice.reply_markup.to_dict(), self.reply_markup.to_dict())
|
||||
|
|
Loading…
Add table
Reference in a new issue