(self)
| 60 | assert msg.text == 'got' |
| 61 | |
| 62 | def test_message_handler_reg(self): |
| 63 | bot = telebot.TeleBot(TOKEN) |
| 64 | msg = self.create_text_message(r'https://web.telegram.org/') |
| 65 | |
| 66 | # noinspection PyUnusedLocal |
| 67 | @bot.message_handler(regexp=r'((https?):((//)|(\\\\))+([\w\d:#@%/;$()~_?\+-=\\\.&](#!)?)*)') |
| 68 | def command_url(message): |
| 69 | msg.text = 'got' |
| 70 | |
| 71 | bot.process_new_messages([msg]) |
| 72 | time.sleep(1) |
| 73 | assert msg.text == 'got' |
| 74 | |
| 75 | def test_message_handler_lambda(self): |
| 76 | bot = telebot.TeleBot(TOKEN) |
nothing calls this directly
no test coverage detected