diff --git a/tests/test_animation.py b/tests/test_animation.py index fb0b77117..ba22e99e6 100644 --- a/tests/test_animation.py +++ b/tests/test_animation.py @@ -72,8 +72,8 @@ class TestAnimation(object): assert message.animation.file_name == animation.file_name assert message.animation.mime_type == animation.mime_type assert message.animation.file_size == animation.file_size - assert message.animation.thumb.width == 50 - assert message.animation.thumb.height == 50 + assert message.animation.thumb.width == 320 + assert message.animation.thumb.height == 180 @flaky(3, 1) def test_resend(self, bot, chat_id, animation): diff --git a/tests/test_audio.py b/tests/test_audio.py index a0e778650..9433edbd7 100644 --- a/tests/test_audio.py +++ b/tests/test_audio.py @@ -48,7 +48,7 @@ class TestAudio(object): audio_file_url = 'https://goo.gl/3En24v' mime_type = 'audio/mpeg' file_size = 122920 - thumb_file_size = 2744 + thumb_file_size = 1427 thumb_width = 50 thumb_height = 50 diff --git a/tests/test_document.py b/tests/test_document.py index f4d8cb60e..2aa4d5dd7 100644 --- a/tests/test_document.py +++ b/tests/test_document.py @@ -43,9 +43,9 @@ class TestDocument(object): file_size = 12948 mime_type = 'image/png' file_name = 'telegram.png' - thumb_file_size = 2364 - thumb_width = 90 - thumb_height = 90 + thumb_file_size = 8090 + thumb_width = 300 + thumb_height = 300 def test_creation(self, document): assert isinstance(document, Document) @@ -75,8 +75,8 @@ class TestDocument(object): assert message.document.mime_type == document.mime_type assert message.document.file_size == document.file_size assert message.caption == self.caption.replace('*', '') - assert message.document.thumb.width == 50 - assert message.document.thumb.height == 50 + assert message.document.thumb.width == self.thumb_width + assert message.document.thumb.height == self.thumb_height @flaky(3, 1) @pytest.mark.timeout(10) diff --git a/tests/test_sticker.py b/tests/test_sticker.py index f10ae657e..b61a8b539 100644 --- a/tests/test_sticker.py +++ b/tests/test_sticker.py @@ -50,9 +50,9 @@ class TestSticker(object): width = 510 height = 512 file_size = 39518 - thumb_width = 90 - thumb_heigth = 90 - thumb_file_size = 3672 + thumb_width = 319 + thumb_height = 320 + thumb_file_size = 21472 def test_creation(self, sticker): # Make sure file has been uploaded. @@ -68,7 +68,7 @@ class TestSticker(object): assert sticker.height == self.height assert sticker.file_size == self.file_size assert sticker.thumb.width == self.thumb_width - assert sticker.thumb.height == self.thumb_heigth + assert sticker.thumb.height == self.thumb_height assert sticker.thumb.file_size == self.thumb_file_size @flaky(3, 1) diff --git a/tests/test_video.py b/tests/test_video.py index d235cf552..2e009ff68 100644 --- a/tests/test_video.py +++ b/tests/test_video.py @@ -45,6 +45,10 @@ class TestVideo(object): mime_type = 'video/mp4' supports_streaming = True + thumb_width = 180 + thumb_height = 320 + thumb_file_size = 1767 + caption = u'VideoTest - *Caption*' video_file_url = 'https://python-telegram-bot.org/static/testfiles/telegram.mp4' @@ -83,8 +87,9 @@ class TestVideo(object): assert message.caption == self.caption.replace('*', '') - assert message.video.thumb.width == 50 - assert message.video.thumb.height == 50 + assert message.video.thumb.file_size == self.thumb_file_size + assert message.video.thumb.width == self.thumb_width + assert message.video.thumb.height == self.thumb_height @flaky(3, 1) @pytest.mark.timeout(10) @@ -115,9 +120,9 @@ class TestVideo(object): assert isinstance(message.video.thumb, PhotoSize) assert isinstance(message.video.thumb.file_id, str) assert message.video.thumb.file_id != '' - assert message.video.thumb.width == video.thumb.width - assert message.video.thumb.height == video.thumb.height - assert message.video.thumb.file_size == video.thumb.file_size + assert message.video.thumb.width == 51 # This seems odd that it's not self.thumb_width + assert message.video.thumb.height == 90 # Ditto + assert message.video.thumb.file_size == 645 # same assert message.caption == self.caption diff --git a/tests/test_videonote.py b/tests/test_videonote.py index 083edcc45..ebc1b24bd 100644 --- a/tests/test_videonote.py +++ b/tests/test_videonote.py @@ -42,6 +42,10 @@ class TestVideoNote(object): duration = 3 file_size = 132084 + thumb_width = 240 + thumb_height = 240 + thumb_file_size = 11547 + caption = u'VideoNoteTest - Caption' def test_creation(self, video_note): @@ -73,8 +77,9 @@ class TestVideoNote(object): assert message.video_note.duration == video_note.duration assert message.video_note.file_size == video_note.file_size - assert message.video_note.thumb.width == 50 - assert message.video_note.thumb.height == 50 + assert message.video_note.thumb.file_size == self.thumb_file_size + assert message.video_note.thumb.width == self.thumb_width + assert message.video_note.thumb.height == self.thumb_height @flaky(3, 1) @pytest.mark.timeout(10)