Exemplo n.º 1
0
def chain(*args, **kwargs ):
    """
    Will return an iterable which can be .chain()'ed as much as you
    like to create multiple Clients.

    >>> chain("localhost").chain("example.com")
    ... [<XML RPC Client for localhost>, <XML RPC Client for example.com>]
    """
    return chains.client_chain(Client, *args, **kwargs)
Exemplo n.º 2
0
 def test_cleint_chain(self):
     """ We should take a klass and starags, returning a `ChainList`"""
     clist = chains.client_chain(dict, [('foo', 'bar')], goo='hoo')
     self.assertIsInstance(clist, chains.ChainList)
     self.assertEqual({'foo': 'bar', 'goo': 'hoo'}, clist[0])