Example #1
0
    def test_referenceable(self):
        """
        A L{pb.Referenceable} instance jellies to a structure which unjellies to
        a L{pb.RemoteReference}.  The C{RemoteReference} has a I{luid} that
        matches up with the local object key in the L{pb.Broker} which sent the
        L{Referenceable}.
        """
        ref = pb.Referenceable()
        jellyBroker = pb.Broker()
        jellyBroker.makeConnection(StringTransport())
        j = jelly.jelly(ref, invoker=jellyBroker)

        unjellyBroker = pb.Broker()
        unjellyBroker.makeConnection(StringTransport())

        uj = jelly.unjelly(j, invoker=unjellyBroker)
        self.assertIn(uj.luid, jellyBroker.localObjects)
 def __init__(self):
     self.o = pb.Referenceable()
 def submitBuildSet(self, bs):
     self.sets.append(bs)
     if self.d:
         reactor.callLater(0, self.d.callback, bs)
         self.d = None
     return pb.Referenceable()  # makes the cleanup work correctly
Example #4
0
 def __init__(self):
     '''初始化'''
     pb.Referenceable()
     self._service = Service('proxy')
Example #5
0
 def __init__(self,parent):
     """初始化"""
     pb.Referenceable()
     self._parent = parent