@pytest.fixture
def redis_pool(redis_connection):

    class FakePool():

        def __await__(self):
            (yield)
            return redis_connection
    pool = FakePool()
    pool._conn = redis_connection
    pool.release = AsyncMock()
    pool.clear = AsyncMock()
    pool.acquire = AsyncMock(return_value=redis_connection)
    pool.__call__ = MagicMock(return_value=pool)
    return pool
@pytest.fixture
def redis_pool(redis_connection):

    class FakePool():

        def __await__(self):
            (yield)
            return redis_connection
    pool = FakePool()
    pool._conn = redis_connection
    pool.release = AsyncMock()
    pool.clear = AsyncMock()
    pool.acquire = AsyncMock(return_value=redis_connection)
    pool.__call__ = MagicMock(return_value=pool)
    return pool