Skip to content

Commit b4b0eb4

Browse files
Eldinnietsnoam
authored andcommitted
Tests files from website (python-telegram-bot#687)
Use website for send from url tests instead of github.
1 parent 8703ae0 commit b4b0eb4

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

tests/test_audio.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ def setUpClass(cls):
3636
cls.caption = "Test audio"
3737
cls.performer = 'Leandro Toledo'
3838
cls.title = 'Teste'
39-
cls.audio_file_url = 'https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/master/tests/data/telegram.mp3'
39+
# cls.audio_file_url = 'https://python-telegram-bot.org/static/testfiles/telegram.mp3'
40+
# Shortened link, the above one is cached with the wrong duration.
41+
cls.audio_file_url = "https://goo.gl/3En24v"
4042

4143
bot_info = get_bot()
4244
cls._chat_id = bot_info['chat_id']

tests/test_document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class DocumentTest(BaseTest, unittest.TestCase):
3333
@classmethod
3434
def setUpClass(cls):
3535
cls.caption = u'DocumentTest - Caption'
36-
cls.document_file_url = 'https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/master/tests/data/telegram.gif'
36+
cls.document_file_url = 'https://python-telegram-bot.org/static/testfiles/telegram.gif'
3737

3838
bot_info = get_bot()
3939
cls._chat_id = bot_info['chat_id']

tests/test_photo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class PhotoTest(BaseTest, unittest.TestCase):
3535
@classmethod
3636
def setUpClass(cls):
3737
cls.caption = u'PhotoTest - Caption'
38-
cls.photo_file_url = 'https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/master/tests/data/telegram.jpg'
38+
cls.photo_file_url = 'https://python-telegram-bot.org/static/testfiles/telegram.jpg'
3939

4040
bot_info = get_bot()
4141
cls._chat_id = bot_info['chat_id']

tests/test_sticker.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ class StickerTest(BaseTest, unittest.TestCase):
3535
@classmethod
3636
def setUpClass(cls):
3737
cls.emoji = telegram.Emoji.FLEXED_BICEPS
38-
cls.sticker_file_url = "https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/master/tests/data/telegram.webp" # noqa
38+
# cls.sticker_file_url = "https://python-telegram-bot.org/static/testfiles/telegram.webp"
39+
# Serving sticker from gh since our server sends wrong content_type
40+
cls.sticker_file_url = "https://github.com/python-telegram-bot/python-telegram-bot/blob/master/tests/data/telegram.webp?raw=true" # noqa
3941

4042
bot_info = get_bot()
4143
cls._chat_id = bot_info['chat_id']

tests/test_video.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class VideoTest(BaseTest, unittest.TestCase):
3434
@classmethod
3535
def setUpClass(cls):
3636
cls.caption = u'VideoTest - Caption'
37-
cls.video_file_url = 'https://python-telegram-bot.org/static/website/telegram.mp4'
37+
cls.video_file_url = 'https://python-telegram-bot.org/static/testfiles/telegram.mp4'
3838

3939
bot_info = get_bot()
4040
cls._chat_id = bot_info['chat_id']

tests/test_voice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class VoiceTest(BaseTest, unittest.TestCase):
3333

3434
@classmethod
3535
def setUpClass(cls):
36-
cls.voice_file_url = 'https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/master/tests/data/telegram.ogg'
36+
cls.voice_file_url = 'https://python-telegram-bot.org/static/testfiles/telegram.ogg'
3737
cls.caption = u"Test voice"
3838

3939
voice_file = open('tests/data/telegram.ogg', 'rb')

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy