Example #1
0
    def test_short(self):
        for i in range(256):
            val = randint(0, 65535)
            w = AMQPWriter()
            w.write_short(val)
            s = w.getvalue()

            r = AMQPReader(s)
            self.assertEqual(r.read_short(), val)
Example #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)