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

Merge pull request #812 from Badiboy/master

Disable REDIS tests to save Travis
This commit is contained in:
Badiboy 2020-04-27 17:47:30 +03:00 committed by GitHub
commit 67cfa04737
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,8 @@ import sys
sys.path.append('../')
REDIS_TESTS = False
import os
import time
@ -9,7 +11,9 @@ import pytest
import telebot
from telebot import types, MemoryHandlerBackend, FileHandlerBackend
from telebot.handler_backends import RedisHandlerBackend
if REDIS_TESTS:
from telebot.handler_backends import RedisHandlerBackend
@pytest.fixture()
@ -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'])