def test__create_accepted_channel(self): ch = ServerChannel() # this is not all that great msg = [None, {'reply-to':'one,two'}] newch = ch._create_accepted_channel(sentinel.amq_chan, msg) self.assertIsInstance(newch, ServerChannel.BidirAcceptChannel) self.assertEquals(newch._amq_chan, sentinel.amq_chan) self.assertEquals(newch._send_name, ('one', 'two'))
def test__create_accepted_channel(self): ch = ServerChannel() # this is not all that great msg = [None, {'reply-to': 'one,two'}] newch = ch._create_accepted_channel(sentinel.amq_chan, msg) self.assertIsInstance(newch, ServerChannel.BidirAcceptChannel) self.assertEquals(newch._amq_chan, sentinel.amq_chan) self.assertTrue(hasattr(newch._send_name, 'exchange')) self.assertTrue(hasattr(newch._send_name, 'queue')) self.assertEquals(newch._send_name.exchange, 'one') self.assertEquals(newch._send_name.queue, 'two')
def test__create_accepted_channel(self): ch = ServerChannel() # this is not all that great msg = [[None, {'reply-to':'one,two'}]] newch = ch._create_accepted_channel(sentinel.transport, msg) self.assertIsInstance(newch, ServerChannel.BidirAcceptChannel) self.assertEquals(newch._transport, sentinel.transport) self.assertTrue(hasattr(newch._send_name, 'exchange')) self.assertTrue(hasattr(newch._send_name, 'queue')) self.assertEquals(newch._send_name.exchange, 'one') self.assertEquals(newch._send_name.queue, 'two')
def test__create_accepted_channel(self): ch = ServerChannel() # this is not all that great msg = [None, {"reply-to": "one,two"}] newch = ch._create_accepted_channel(sentinel.amq_chan, msg) self.assertIsInstance(newch, ServerChannel.BidirAcceptChannel) self.assertEquals(newch._amq_chan, sentinel.amq_chan) self.assertTrue(hasattr(newch._send_name, "exchange")) self.assertTrue(hasattr(newch._send_name, "queue")) self.assertEquals(newch._send_name.exchange, "one") self.assertEquals(newch._send_name.queue, "two")