def _new_transport(self): return AMQPTransportClient.create_and_connect()
def _new_transport(self): params = pika.ConnectionParameters(host='localhost') transport = AMQPTransportClient(params) return transport
def test_create_and_connect(self): config = Mock(Config) AMQPTransportClient.create_and_connect(config) config.to_connection_params.assert_called_once_with()