Ejemplo n.º 1
0
    def setUp(self):
        self.factory = ZmqFactory()
        ZmqXREQConnection.identity = 'client'
        self.r = ZmqTestXREPConnection(
            self.factory, ZmqEndpoint(ZmqEndpointType.bind, "ipc://#3"))
        self.s = ZmqXREQConnection(
            self.factory, ZmqEndpoint(ZmqEndpointType.connect, "ipc://#3"))
        self.count = 0

        def get_next_id():
            self.count += 1
            return 'msg_id_%d' % (self.count, )

        self.s._getNextId = get_next_id