コード例 #1
0
 def setUp(self):
     self.a1 = TestProtocol(TestAvatar('tskww', ['users', 'admin']))
     self.u1 = TestProtocol(TestAvatar('usr1', ['users']))
     self.u2 = TestProtocol(TestAvatar('usr2', ['users']))
     self.u3 = TestProtocol(TestAvatar('usr3', ['none']))
     self.mqm = messagequeue.MessageQueueManager()
     self.mqm.set_queue_rights(queue_rights)
コード例 #2
0
 def setUp(self):
     self.u1 = TestProtocol(TestAvatar('usr1', ['users']))
     self.u2 = TestProtocol(TestAvatar('usr2', ['users']))
     self.u3 = TestProtocol(TestAvatar('usr3', ['none']))
     self.mqm = messagequeue.MessageQueueManager()
     self.mqm.set_queue_rights(queue_rights)
     self.mqm.create_queue(self.u1, qall)
コード例 #3
0
    def setUp(self):
        self.timeout = 5
        self.log = logging.getLogger("sender")
        self.mqm = messagequeue.MessageQueueManager()
        self.mqs = mqsecurity.MQPortal(self.mqm, None)
        self.mqm.set_queue_rights(queue_rights)

        self.factory = StompFactory(mqm=self.mqm)
        self.factory.mq_portal = self.mqs
        self.serverProtocol = self.factory.buildProtocol(None)
        self.serverProtocol.log = self.log
        self.client = StompClientProtocol('users', 'users')
        self.client.log = self.log
        self.loopbackBody = loopback.loopbackAsync(self.serverProtocol,
                                                   self.client)
コード例 #4
0
    def setUp(self):
        self.u1 = TestProtocol(TestAvatar('usr1', ['users']))
        self.u2 = TestProtocol(TestAvatar('usr2', ['users']))
        self.u3 = TestProtocol(TestAvatar('usr3', ['users']))
        self.u4 = TestProtocol(TestAvatar('usr4', ['users']))
        self.mqm = messagequeue.MessageQueueManager()
        self.mqm.set_queue_rights(queue_rights)

        self.mqm.create_queue(self.u1, uall + "1")
        self.mqm.create_queue(self.u1, uall + "2")
        self.mqm.create_queue(self.u1, uall + "3")

        self.mqm.subscribe_queue(self.u2, uall + "1")
        self.mqm.subscribe_queue(self.u3, uall + "2")
        self.mqm.subscribe_queue(self.u4, uall + "3")