mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Add ENABLE_MIDDLEWARE=False in apihelpers to keep backward compatibility
This commit is contained in:
@@ -508,6 +508,10 @@ class TestTeleBot:
|
||||
assert ret_msg.caption_entities[0].type == 'italic'
|
||||
|
||||
def test_typed_middleware_handler(self):
|
||||
from telebot import apihelper
|
||||
|
||||
apihelper.ENABLE_MIDDLEWARE = True
|
||||
|
||||
tb = telebot.TeleBot('')
|
||||
update = self.create_message_update('/help')
|
||||
|
||||
@@ -524,6 +528,10 @@ class TestTeleBot:
|
||||
assert update.message.text == 'got' * 2
|
||||
|
||||
def test_default_middleware_handler(self):
|
||||
from telebot import apihelper
|
||||
|
||||
apihelper.ENABLE_MIDDLEWARE = True
|
||||
|
||||
tb = telebot.TeleBot('')
|
||||
update = self.create_message_update('/help')
|
||||
|
||||
|
Reference in New Issue
Block a user