(self)
| 99 | assert not msg.text == 'got' |
| 100 | |
| 101 | def test_message_handler_reg_fail(self): |
| 102 | bot = telebot.TeleBot(TOKEN) |
| 103 | msg = self.create_text_message(r'web.telegram.org/') |
| 104 | |
| 105 | # noinspection PyUnusedLocal |
| 106 | @bot.message_handler(regexp=r'((https?):((//)|(\\\\))+([\w\d:#@%/;$()~_?\+-=\\\.&](#!)?)*)') |
| 107 | def command_url(message): |
| 108 | msg.text = 'got' |
| 109 | |
| 110 | bot.process_new_messages([msg]) |
| 111 | time.sleep(1) |
| 112 | assert not msg.text == 'got' |
| 113 | |
| 114 | def test_send_message_with_markdown(self): |
| 115 | tb = telebot.TeleBot(TOKEN) |
nothing calls this directly
no test coverage detected