1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Support new sendVideo API method.

This commit is contained in:
eternnoir
2015-08-01 10:12:15 +08:00
parent b745088a05
commit 821a63e3a7
4 changed files with 44 additions and 8 deletions

Binary file not shown.

View File

@ -77,6 +77,20 @@ def test_send_file():
assert ret_msg.message_id
def test_send_video():
file_data = open('./test_data/test_video.mp4', 'rb')
tb = telebot.TeleBot(TOKEN)
ret_msg = tb.send_video(CHAT_ID, file_data)
assert ret_msg.message_id
def test_send_video_more_params():
file_data = open('./test_data/test_video.mp4', 'rb')
tb = telebot.TeleBot(TOKEN)
ret_msg = tb.send_video(CHAT_ID, file_data, 1)
assert ret_msg.message_id
def test_send_file_exception():
tb = telebot.TeleBot(TOKEN)
try:
@ -149,7 +163,7 @@ def test_send_location():
def create_text_message(text):
params = {'text': text}
chat = types.User(11,'test')
chat = types.User(11, 'test')
return types.Message(1, None, None, chat, 'text', params)