Exemplo n.º 1
0
    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'))
Exemplo n.º 2
0
    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')
Exemplo n.º 3
0
    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')
Exemplo n.º 4
0
    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")