diff --git a/tests/test_audio.py b/tests/test_audio.py index c50025ffd..d66a89f91 100644 --- a/tests/test_audio.py +++ b/tests/test_audio.py @@ -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""" diff --git a/tests/test_document.py b/tests/test_document.py index ea48f136b..494bf9987 100644 --- a/tests/test_document.py +++ b/tests/test_document.py @@ -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""" diff --git a/tests/test_video.py b/tests/test_video.py index 20aa2cc3d..85e7cbc70 100644 --- a/tests/test_video.py +++ b/tests/test_video.py @@ -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) diff --git a/tests/test_voice.py b/tests/test_voice.py index 44ed0c15e..da9edd891 100644 --- a/tests/test_voice.py +++ b/tests/test_voice.py @@ -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"""