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

Implemented register_for_reply. Closes #26

This commit is contained in:
pieter
2015-07-24 13:44:01 +02:00
parent b468e8c943
commit 2647777b2b
2 changed files with 50 additions and 1 deletions

View File

@@ -123,6 +123,18 @@ def test_reply_to():
ret_msg = tb.reply_to(msg, text + ' REPLY')
assert ret_msg.reply_to_message.message_id == msg.message_id
def test_register_for_reply():
text = 'CI reply_to Test Message'
tb = telebot.TeleBot(TOKEN)
msg = tb.send_message(CHAT_ID, text, reply_markup=types.ForceReply())
reply_msg = tb.reply_to(msg, text + ' REPLY')
def process_reply(message):
assert msg.message_id == message.reply_to_message.message_id
tb.register_for_reply(msg, process_reply)
tb.process_new_messages([reply_msg])
def test_send_location():
tb = telebot.TeleBot(TOKEN)