1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Disable REDIS tests to save Travis

To enable REDIS set
test_handler_backeds.REDIS_TEST = True
before running tests.
This commit is contained in:
Badiboy 2020-04-27 17:46:19 +03:00
parent f3a65ef9b3
commit be5d7bb73d

View File

@ -2,6 +2,8 @@ import sys
sys.path.append('../')
REDIS_TESTS = False
import os
import time
@ -9,6 +11,8 @@ import pytest
import telebot
from telebot import types, MemoryHandlerBackend, FileHandlerBackend
if REDIS_TESTS:
from telebot.handler_backends import RedisHandlerBackend
@ -226,6 +230,9 @@ def test_file_handler_backend_clear_next_step_handler(telegram_bot, private_chat
def test_redis_handler_backend_register_next_step_handler(telegram_bot, private_chat, update_type):
if not(REDIS_TESTS):
return
telegram_bot.next_step_backend = RedisHandlerBackend(prefix='pyTelegramBotApi:step_backend1')
@telegram_bot.message_handler(commands=['start'])
@ -241,6 +248,9 @@ def test_redis_handler_backend_register_next_step_handler(telegram_bot, private_
def test_redis_handler_backend_clear_next_step_handler(telegram_bot, private_chat, update_type):
if not(REDIS_TESTS):
return
telegram_bot.next_step_backend = RedisHandlerBackend(prefix='pyTelegramBotApi:step_backend2')
@telegram_bot.message_handler(commands=['start'])