mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-22 23:27:49 +01:00
Tests files from website (#687)
Use website for send from url tests instead of github.
This commit is contained in:
parent
8703ae0b8d
commit
b4b0eb4686
6 changed files with 10 additions and 6 deletions
|
@ -36,7 +36,9 @@ class AudioTest(BaseTest, unittest.TestCase):
|
|||
cls.caption = "Test audio"
|
||||
cls.performer = 'Leandro Toledo'
|
||||
cls.title = 'Teste'
|
||||
cls.audio_file_url = 'https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/master/tests/data/telegram.mp3'
|
||||
# cls.audio_file_url = 'https://python-telegram-bot.org/static/testfiles/telegram.mp3'
|
||||
# Shortened link, the above one is cached with the wrong duration.
|
||||
cls.audio_file_url = "https://goo.gl/3En24v"
|
||||
|
||||
bot_info = get_bot()
|
||||
cls._chat_id = bot_info['chat_id']
|
||||
|
|
|
@ -33,7 +33,7 @@ class DocumentTest(BaseTest, unittest.TestCase):
|
|||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.caption = u'DocumentTest - Caption'
|
||||
cls.document_file_url = 'https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/master/tests/data/telegram.gif'
|
||||
cls.document_file_url = 'https://python-telegram-bot.org/static/testfiles/telegram.gif'
|
||||
|
||||
bot_info = get_bot()
|
||||
cls._chat_id = bot_info['chat_id']
|
||||
|
|
|
@ -35,7 +35,7 @@ class PhotoTest(BaseTest, unittest.TestCase):
|
|||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.caption = u'PhotoTest - Caption'
|
||||
cls.photo_file_url = 'https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/master/tests/data/telegram.jpg'
|
||||
cls.photo_file_url = 'https://python-telegram-bot.org/static/testfiles/telegram.jpg'
|
||||
|
||||
bot_info = get_bot()
|
||||
cls._chat_id = bot_info['chat_id']
|
||||
|
|
|
@ -35,7 +35,9 @@ class StickerTest(BaseTest, unittest.TestCase):
|
|||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.emoji = telegram.Emoji.FLEXED_BICEPS
|
||||
cls.sticker_file_url = "https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/master/tests/data/telegram.webp" # noqa
|
||||
# cls.sticker_file_url = "https://python-telegram-bot.org/static/testfiles/telegram.webp"
|
||||
# Serving sticker from gh since our server sends wrong content_type
|
||||
cls.sticker_file_url = "https://github.com/python-telegram-bot/python-telegram-bot/blob/master/tests/data/telegram.webp?raw=true" # noqa
|
||||
|
||||
bot_info = get_bot()
|
||||
cls._chat_id = bot_info['chat_id']
|
||||
|
|
|
@ -34,7 +34,7 @@ class VideoTest(BaseTest, unittest.TestCase):
|
|||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.caption = u'VideoTest - Caption'
|
||||
cls.video_file_url = 'https://python-telegram-bot.org/static/website/telegram.mp4'
|
||||
cls.video_file_url = 'https://python-telegram-bot.org/static/testfiles/telegram.mp4'
|
||||
|
||||
bot_info = get_bot()
|
||||
cls._chat_id = bot_info['chat_id']
|
||||
|
|
|
@ -33,7 +33,7 @@ class VoiceTest(BaseTest, unittest.TestCase):
|
|||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.voice_file_url = 'https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/master/tests/data/telegram.ogg'
|
||||
cls.voice_file_url = 'https://python-telegram-bot.org/static/testfiles/telegram.ogg'
|
||||
cls.caption = u"Test voice"
|
||||
|
||||
voice_file = open('tests/data/telegram.ogg', 'rb')
|
||||
|
|
Loading…
Reference in a new issue