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()
def _setup_transport(self): transport = AMQPTransportServer.create_and_connect( self._process_next_command, self._QUEUE_NAME) return transport
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
def _setup_transport(self): transport = AMQPTransportServer.create_and_connect(self._process_next_command, self._QUEUE_NAME) return transport