Exemplo n.º 1
0
    def test_create_and_connect(self):
        callback = Mock()
        config = Mock(Config)

        AMQPTransportServer.create_and_connect(callback, 'queue_name', config)

        config.to_connection_params.assert_called_once_with()
Exemplo n.º 2
0
 def _setup_transport(self):
     transport = AMQPTransportServer.create_and_connect(
         self._process_next_command, self._QUEUE_NAME)
     return transport
Exemplo n.º 3
0
    def _new_transport(self, request_callback=None):
        request_callback = request_callback or Mock()
        params = pika.ConnectionParameters(host='localhost')
        transport = AMQPTransportServer(params, request_callback, 'queue_name')

        return transport
Exemplo n.º 4
0
 def _setup_transport(self):
     transport = AMQPTransportServer.create_and_connect(self._process_next_command,
                                                        self._QUEUE_NAME)
     return transport