Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tests files from website #687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/test_audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ def setUpClass(cls):
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']
Expand Down
2 changes: 1 addition & 1 deletion tests/test_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
2 changes: 1 addition & 1 deletion tests/test_photo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
4 changes: 3 additions & 1 deletion tests/test_sticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
2 changes: 1 addition & 1 deletion tests/test_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
2 changes: 1 addition & 1 deletion tests/test_voice.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down