def test_get_client_nowait2(self): c = ClientPool(max_size=1) client1 = c.get_client_nowait() self.assertTrue(isinstance(client1, Client)) client2 = c.get_client_nowait() self.assertTrue(client2 is None) c.release_client(client1) c.destroy()
def test_get_client_nowait1(self): c = ClientPool() client = c.get_client_nowait() self.assertTrue(isinstance(client, Client)) c.release_client(client) c.destroy()