async def test_no_connection_to_release(): match = r'^no connection of norel to release$' with pytest.raises(RedisConnectorError, match=match): RedisConnector.instance('norel').release()
async def redis(): from tornado_battery.redis import connect_redis redis = RedisConnector.instance('test') connect = connect_redis('test') await connect() return redis
async def test_no_connection(): match = r"^no connection of noconn found$" with pytest.raises(RedisConnectorError, match=match): RedisConnector.instance("noconn").connection()
async def redis(): redis = RedisConnector.instance('locks') await redis.connect() yield redis
async def redis(): redis = RedisConnector.instance("test") await redis.connect() return redis