mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2021-05-13 03:08:02 +03:00
Fix python3 test cases.
This commit is contained in:
@@ -45,7 +45,7 @@ def test_send_file_by_id():
|
|||||||
|
|
||||||
|
|
||||||
def test_send_file():
|
def test_send_file():
|
||||||
file_data = open('../examples/detailed_example/kitten.jpg')
|
file_data = open('../examples/detailed_example/kitten.jpg', 'rb')
|
||||||
tb = telebot.TeleBot(TOKEN)
|
tb = telebot.TeleBot(TOKEN)
|
||||||
ret_msg = tb.send_document(CHAT_ID, file_data)
|
ret_msg = tb.send_document(CHAT_ID, file_data)
|
||||||
assert ret_msg.message_id
|
assert ret_msg.message_id
|
||||||
@@ -59,7 +59,7 @@ def test_send_photo_by_id():
|
|||||||
|
|
||||||
|
|
||||||
def test_send_photo():
|
def test_send_photo():
|
||||||
file_data = open('../examples/detailed_example/kitten.jpg')
|
file_data = open('../examples/detailed_example/kitten.jpg', 'rb')
|
||||||
tb = telebot.TeleBot(TOKEN)
|
tb = telebot.TeleBot(TOKEN)
|
||||||
ret_msg = tb.send_photo(CHAT_ID, file_data)
|
ret_msg = tb.send_photo(CHAT_ID, file_data)
|
||||||
assert ret_msg.message_id
|
assert ret_msg.message_id
|
||||||
|
|||||||
Reference in New Issue
Block a user