Ejemplo n.º 1
0
 def make_client_pool(self, hostname, mock_socket_values,
                      serializer=None, **kwargs):
     mock_client = Client(hostname, serializer=serializer, **kwargs)
     mock_client.sock = MockSocket(mock_socket_values)
     client = PooledClient(hostname, serializer=serializer)
     client.client_pool = pool.ObjectPool(lambda: mock_client)
     return mock_client
Ejemplo n.º 2
0
 def make_client(self, mock_socket_values, **kwargs):
     mock_client = Client(None, key_prefix=b'xyz:', **kwargs)
     mock_client.sock = MockSocket(list(mock_socket_values))
     client = PooledClient(None, key_prefix=b'xyz:', **kwargs)
     client.client_pool = pool.ObjectPool(lambda: mock_client)
     return client
Ejemplo n.º 3
0
 def make_client(self, mock_socket_values, **kwargs):
     mock_client = Client(None, **kwargs)
     mock_client.sock = MockSocket(list(mock_socket_values))
     client = PooledClient(None, **kwargs)
     client.client_pool = pool.ObjectPool(lambda: mock_client)
     return client
Ejemplo n.º 4
0
 def make_client(self, mock_socket_values, serializer=None):
     mock_client = Client(None, serializer=serializer, key_prefix=b'xyz:')
     mock_client.sock = MockSocket(list(mock_socket_values))
     client = PooledClient(None, serializer=serializer, key_prefix=b'xyz:')
     client.client_pool = pool.ObjectPool(lambda: mock_client)
     return client