X Tutup
Skip to content

Commit a9a503b

Browse files
Eldinnietsnoam
authored andcommitted
Increase timeouts on creation of fixtures in tests (python-telegram-bot#1015)
1 parent 3762792 commit a9a503b

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

tests/test_audio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def audio_file():
3434
@pytest.fixture(scope='class')
3535
def audio(bot, chat_id):
3636
with open('tests/data/telegram.mp3', 'rb') as f:
37-
return bot.send_audio(chat_id, audio=f, timeout=10).audio
37+
return bot.send_audio(chat_id, audio=f, timeout=50).audio
3838

3939

4040
class TestAudio(object):

tests/test_document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def document_file():
3434
@pytest.fixture(scope='class')
3535
def document(bot, chat_id):
3636
with open('tests/data/telegram.png', 'rb') as f:
37-
return bot.send_document(chat_id, document=f).document
37+
return bot.send_document(chat_id, document=f, timeout=50).document
3838

3939

4040
class TestDocument(object):

tests/test_photo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def photo_file():
3535
@pytest.fixture(scope='class')
3636
def _photo(bot, chat_id):
3737
with open('tests/data/telegram.jpg', 'rb') as f:
38-
return bot.send_photo(chat_id, photo=f, timeout=10).photo
38+
return bot.send_photo(chat_id, photo=f, timeout=50).photo
3939

4040

4141
@pytest.fixture(scope='class')

tests/test_sticker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def sticker_file():
3737
@pytest.fixture(scope='class')
3838
def sticker(bot, chat_id):
3939
with open('tests/data/telegram.webp', 'rb') as f:
40-
return bot.send_sticker(chat_id, sticker=f, timeout=10).sticker
40+
return bot.send_sticker(chat_id, sticker=f, timeout=50).sticker
4141

4242

4343
class TestSticker(object):

tests/test_video.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def video_file():
3434
@pytest.fixture(scope='class')
3535
def video(bot, chat_id):
3636
with open('tests/data/telegram.mp4', 'rb') as f:
37-
return bot.send_video(chat_id, video=f, timeout=10).video
37+
return bot.send_video(chat_id, video=f, timeout=50).video
3838

3939

4040
class TestVideo(object):

tests/test_videonote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def video_note_file():
3434
@pytest.fixture(scope='class')
3535
def video_note(bot, chat_id):
3636
with open('tests/data/telegram2.mp4', 'rb') as f:
37-
return bot.send_video_note(chat_id, video_note=f, timeout=10).video_note
37+
return bot.send_video_note(chat_id, video_note=f, timeout=50).video_note
3838

3939

4040
class TestVideoNote(object):

tests/test_voice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def voice_file():
3434
@pytest.fixture(scope='class')
3535
def voice(bot, chat_id):
3636
with open('tests/data/telegram.ogg', 'rb') as f:
37-
return bot.send_voice(chat_id, voice=f, timeout=10).voice
37+
return bot.send_voice(chat_id, voice=f, timeout=50).voice
3838

3939

4040
class TestVoice(object):

0 commit comments

Comments
 (0)
X Tutup