Correctly skip Redis tests

This commit is contained in:
Alex Root Junior 2021-06-15 01:01:32 +03:00
parent f40ab53fd4
commit 98de096f3b

View file

@ -39,6 +39,8 @@ def redis_server(request):
@pytest.fixture()
@pytest.mark.redis
async def redis_storage(redis_server):
if not redis_server:
pytest.skip("Redis is not available here")
storage = RedisStorage.from_url(redis_server)
try:
yield storage