(self)
| 48 | tb.set_update_listener(listener) |
| 49 | |
| 50 | def test_message_handler(self): |
| 51 | tb = telebot.TeleBot(TOKEN) |
| 52 | msg = self.create_text_message('/help') |
| 53 | |
| 54 | @tb.message_handler(commands=['help', 'start']) |
| 55 | def command_handler(message): |
| 56 | message.text = 'got' |
| 57 | |
| 58 | tb.process_new_messages([msg]) |
| 59 | time.sleep(1) |
| 60 | assert msg.text == 'got' |
| 61 | |
| 62 | def test_message_handler_reg(self): |
| 63 | bot = telebot.TeleBot(TOKEN) |
nothing calls this directly
no test coverage detected