From f51327097135e637b6a58dfb80920bf496a9d19f Mon Sep 17 00:00:00 2001 From: eternnoir Date: Wed, 22 Jul 2015 14:12:56 +0800 Subject: [PATCH] PEP8. --- tests/test_telebot.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_telebot.py b/tests/test_telebot.py index 0c2ba55..7846cc9 100644 --- a/tests/test_telebot.py +++ b/tests/test_telebot.py @@ -36,12 +36,15 @@ def test_message_handler(): time.sleep(1) assert msg.text == 'got' + def test_message_handler_reg(): bot = telebot.TeleBot('') msg = create_text_message(r'https://web.telegram.org/') + @bot.message_handler(regexp='((https?):((//)|(\\\\))+([\w\d:#@%/;$()~_?\+-=\\\.&](#!)?)*)') def command_url(message): msg.text = 'got' + bot.process_new_messages([msg]) time.sleep(1) assert msg.text == 'got' @@ -50,9 +53,11 @@ def test_message_handler_reg(): def test_message_handler_reg_fail(): bot = telebot.TeleBot('') msg = create_text_message(r'web.telegram.org/') + @bot.message_handler(regexp='((https?):((//)|(\\\\))+([\w\d:#@%/;$()~_?\+-=\\\.&](#!)?)*)') def command_url(message): msg.text = 'got' + bot.process_new_messages([msg]) time.sleep(1) assert not msg.text == 'got' @@ -136,4 +141,3 @@ def test_is_string_string(): def test_not_string(): i1 = 10 assert not apihelper.is_string(i1) -