Fix file_size tests for send* by URL

This commit is contained in:
Leandro Toledo 2016-01-11 20:33:17 -02:00
parent 7227ca3aab
commit 12d71d5a91
4 changed files with 5 additions and 5 deletions

View file

@ -148,7 +148,7 @@ class AudioTest(BaseTest, unittest.TestCase):
self.assertEqual(audio.performer, self.performer)
self.assertEqual(audio.title, self.title)
self.assertEqual(audio.mime_type, self.mime_type)
self.assertEqual(audio.file_size, 36320)
self.assertEqual(audio.file_size, self.file_size)
def test_send_audio_resend(self):
"""Test telegram.Bot sendAudio method"""

View file

@ -34,7 +34,7 @@ class DocumentTest(BaseTest, unittest.TestCase):
def setUp(self):
self.document_file = open('tests/data/telegram.png', 'rb')
self.document_file_id = 'BQADAQADpAADHyP1B04ipZxJTe2BAg'
self.document_file_url = 'http://dummyimage.com/600x400/000/fff.gif&text=telegram'
self.document_file_url = 'https://github.com/python-telegram-bot/python-telegram-bot/blob/master/tests/data/telegram.gif'
self.thumb = {'width': 90,
'height': 90,
'file_id': 'BQADAQADoQADHyP1B0mzJMVyzcB0Ag',
@ -98,7 +98,7 @@ class DocumentTest(BaseTest, unittest.TestCase):
self.assertTrue(isinstance(document.thumb, telegram.PhotoSize))
self.assertEqual(document.file_name, 'fff.gif')
self.assertEqual(document.mime_type, 'image/gif')
self.assertEqual(document.file_size, 3878)
self.assertEqual(document.file_size, self.file_size)
def test_send_document_resend(self):
"""Test telegram.Bot sendDocument method"""

View file

@ -158,7 +158,7 @@ class VideoTest(BaseTest, unittest.TestCase):
self.assertEqual(video.duration, self.duration)
self.assertEqual(video.thumb, None)
self.assertEqual(video.mime_type, '')
self.assertEqual(video.file_size, 36315)
self.assertEqual(video.file_size, self.file_size)
self.assertEqual(message.caption, self.caption)

View file

@ -126,7 +126,7 @@ class VoiceTest(BaseTest, unittest.TestCase):
self.assertNotEqual(voice.file_id, '')
self.assertEqual(voice.duration, self.duration)
self.assertEqual(voice.mime_type, self.mime_type)
self.assertEqual(voice.file_size, 36316)
self.assertEqual(voice.file_size, self.file_size)
def test_send_voice_resend(self):
"""Test telegram.Bot sendVoice method"""