mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Add tests for file sending with name
This commit is contained in:
parent
e56f134a7c
commit
a791ff4e46
@ -126,6 +126,16 @@ class TestTeleBot:
|
|||||||
ret_msg = tb.send_document(CHAT_ID, ret_msg.document.file_id)
|
ret_msg = tb.send_document(CHAT_ID, ret_msg.document.file_id)
|
||||||
assert ret_msg.message_id
|
assert ret_msg.message_id
|
||||||
|
|
||||||
|
def test_send_file_with_filename(self):
|
||||||
|
file_data = open('../examples/detailed_example/kitten.jpg', 'rb')
|
||||||
|
tb = telebot.TeleBot(TOKEN)
|
||||||
|
|
||||||
|
ret_msg = tb.send_document(CHAT_ID, file_data)
|
||||||
|
assert ret_msg.message_id
|
||||||
|
|
||||||
|
ret_msg = tb.send_document(CHAT_ID, file_data, file_name="test.jpg")
|
||||||
|
assert ret_msg.message_id
|
||||||
|
|
||||||
def test_send_file_dis_noti(self):
|
def test_send_file_dis_noti(self):
|
||||||
file_data = open('../examples/detailed_example/kitten.jpg', 'rb')
|
file_data = open('../examples/detailed_example/kitten.jpg', 'rb')
|
||||||
tb = telebot.TeleBot(TOKEN)
|
tb = telebot.TeleBot(TOKEN)
|
||||||
|
Loading…
Reference in New Issue
Block a user