@defer.inlineCallbacks
    def test_consume_all_requeued_messages(self):
        yield self.connect()
        
        yield self.amqp.chan.exchange_declare(exchange='messaging', type='topic')

        # Consume
        yield self.amqp.named_queue_declare(queue="submit.sm_all_1")
        yield self.amqp.chan.queue_bind(queue="submit.sm_all_1", exchange="messaging", routing_key="submit.sm.*")
        yield self.amqp.chan.basic_consume(queue="submit.sm_all_1", no_ack=False, consumer_tag='qtag')
        queue = yield self.amqp.client.queue('qtag')
        queue.get().addCallback(self._callback_reject_once, queue, reject = True).addErrback(self._errback)
        
        # Publish
        for i in range(3000):
            yield self.amqp.publish(exchange='messaging', routing_key="submit.sm.connector01", 
                content=Content(str(i)))

        # Wait for 20 seconds
        # (give some time to the consumer to get its work done)
        yield waitFor(20)
        
        yield queue.close()

        yield self.amqp.disconnect()
        
        self.assertEqual(self.rejectedMessages, 3000)
        self.assertEqual(self.consumedMessages, 3000)
Converts entities from the get response and adds them to the dict.
dataset/ETHPy150Open jookies/jasmin/jasmin/queues/test/test_amqp.py/RejectAndRequeueTestCase.test_consume_all_requeued_messages--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/datastore/datastore_rpc.py/BaseConnection.__add_get_response_entities_to_dict