mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-01-01 08:56:27 +01:00
fix test_video unitest
This commit is contained in:
parent
976f34082f
commit
1db1b76a7c
1 changed files with 7 additions and 2 deletions
|
@ -36,7 +36,7 @@ class VideoTest(BaseTest, unittest.TestCase):
|
|||
def setUp(self):
|
||||
self.video_file = open('tests/data/telegram.mp4', 'rb')
|
||||
self.video_file_id = 'BAADAQADXwADHyP1BwJFTcmY2RYCAg'
|
||||
self.video_file_url = 'https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/master/tests/data/telegram.mp4'
|
||||
self.video_file_url = 'https://python-telegram-bot.org/static/website/telegram.mp4'
|
||||
self.width = 360
|
||||
self.height = 640
|
||||
self.duration = 5
|
||||
|
@ -44,6 +44,11 @@ class VideoTest(BaseTest, unittest.TestCase):
|
|||
'file_size': 645,
|
||||
'height': 90,
|
||||
'width': 51}, self._bot)
|
||||
self.thumb_from_url = telegram.PhotoSize.de_json({'file_id':
|
||||
'AAQEABPZU2EZAAQ_tPcvcRTF4i1GAQABAg',
|
||||
'file_size': 645,
|
||||
'height': 90,
|
||||
'width': 51}, self._bot)
|
||||
self.mime_type = 'video/mp4'
|
||||
self.file_size = 326534
|
||||
|
||||
|
@ -162,7 +167,7 @@ class VideoTest(BaseTest, unittest.TestCase):
|
|||
self.assertNotEqual(video.file_id, '')
|
||||
self.assertEqual(video.height, self.height)
|
||||
self.assertEqual(video.duration, self.duration)
|
||||
self.assertEqual(video.thumb, self.thumb)
|
||||
self.assertEqual(video.thumb, self.thumb_from_url)
|
||||
self.assertEqual(video.mime_type, '')
|
||||
self.assertEqual(video.file_size, self.file_size)
|
||||
|
||||
|
|
Loading…
Reference in a new issue