def test_get_client_context_manager(self): c = ClientPool(max_size=1) with (yield c.connected_client()) as client: pass client = yield c.get_connected_client() c.release_client(client) c.destroy()
def test_get_client_context_manager(self): c = ClientPool(max_size=1) with (yield c.connected_client()) as client: pass client = yield c.get_connected_client() c.release_client(client) c.destroy()
def test_constructor(self): c = ClientPool(max_size=-1, client_timeout=-1, port=6379, host="localhost", password="******") with (yield c.connected_client()) as client: self.assertTrue(isinstance(client, ClientError)) pass c.destroy()
def test_constructor(self): c = ClientPool(max_size=-1, client_timeout=-1, port=6379, host="localhost", password="******") with (yield c.connected_client()) as client: self.assertTrue(isinstance(client, ClientError)) pass c.destroy()