@pytest.mark.asyncio
async def test_get_pool_locked(self, mocker, redis, create_pool):
    redis._pool = None
    mocker.spy(redis._pool_lock, 'acquire')
    mocker.spy(redis._pool_lock, 'release')
    assert ((await redis._get_pool()) == create_pool.return_value)
    assert (redis._pool_lock.acquire.call_count == 1)
    assert (redis._pool_lock.release.call_count == 1)
@pytest.mark.asyncio
async def test_get_pool_locked(self, mocker, redis, create_pool):
    redis._pool = None
    mocker.spy(redis._pool_lock, 'acquire')
    mocker.spy(redis._pool_lock, 'release')
    assert ((await redis._get_pool()) == create_pool.return_value)
    assert (redis._pool_lock.acquire.call_count == 1)
    assert (redis._pool_lock.release.call_count == 1)