示例#1
0
    def test_long(self):
        for i in range(256):
            val = randint(0, (2**32) - 1)
            w = AMQPWriter()
            w.write_long(val)
            s = w.getvalue()

            r = AMQPReader(s)
            self.assertEqual(r.read_long(), val)
示例#2
0
 def tune(self, channel_max, frame_max, heartbeat):
     args = AMQPWriter()
     args.write_short(channel_max)
     args.write_long(frame_max)
     args.write_short(heartbeat)
     self._send_channel_method_frame(0, (10, 30), args)