Fix data objects references for tests to raw files on Githup repo

This commit is contained in:
Leandro Toledo 2016-01-11 21:11:10 -02:00
parent 12d71d5a91
commit b4abf75524
4 changed files with 6 additions and 6 deletions

View file

@ -34,7 +34,7 @@ class AudioTest(BaseTest, unittest.TestCase):
def setUp(self):
self.audio_file = open('tests/data/telegram.mp3', 'rb')
self.audio_file_id = 'BQADAQADDwADHyP1B6PSPq2HjX8kAg'
self.audio_file_url = 'https://github.com/python-telegram-bot/python-telegram-bot/blob/master/tests/data/telegram.mp3'
self.audio_file_url = 'https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/master/tests/data/telegram.mp3'
self.duration = 4
self.performer = 'Leandro Toledo'
self.title = 'Teste'

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 = 'https://github.com/python-telegram-bot/python-telegram-bot/blob/master/tests/data/telegram.gif'
self.document_file_url = 'https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/master/tests/data/telegram.gif'
self.thumb = {'width': 90,
'height': 90,
'file_id': 'BQADAQADoQADHyP1B0mzJMVyzcB0Ag',
@ -96,9 +96,9 @@ class DocumentTest(BaseTest, unittest.TestCase):
self.assertTrue(isinstance(document.file_id, str))
self.assertNotEqual(document.file_id, '')
self.assertTrue(isinstance(document.thumb, telegram.PhotoSize))
self.assertEqual(document.file_name, 'fff.gif')
self.assertEqual(document.file_name, 'telegram.gif')
self.assertEqual(document.mime_type, 'image/gif')
self.assertEqual(document.file_size, self.file_size)
self.assertEqual(document.file_size, 3878)
def test_send_document_resend(self):
"""Test telegram.Bot sendDocument method"""

View file

@ -34,7 +34,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://github.com/python-telegram-bot/python-telegram-bot/blob/urls/tests/data/telegram.mp4'
self.video_file_url = 'https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/master/tests/data/telegram.mp4'
self.width = 360
self.height = 640
self.duration = 4

View file

@ -34,7 +34,7 @@ class VoiceTest(BaseTest, unittest.TestCase):
def setUp(self):
self.voice_file = open('tests/data/telegram.ogg', 'rb')
self.voice_file_id = 'AwADAQADTgADHyP1B_mbw34svXPHAg'
self.voice_file_url = 'https://github.com/python-telegram-bot/python-telegram-bot/blob/urls/tests/data/telegram.ogg'
self.voice_file_url = 'https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/master/tests/data/telegram.ogg'
self.duration = 0
self.mime_type = 'audio/ogg'
self.file_size = 9199