def test_iterqueue(self, n='test_iterqueue'):
    i = [0]

    class C(compat.Consumer):

        def fetch(self, limit=None):
            z = i[0]
            i[0] += 1
            return z
    c = C(self.connection, queue=n, exchange=n, routing_key='rkey')
    self.assertEqual(list(c.iterqueue(limit=10)), list(range(10)))
    c.close()
def test_iterqueue(self, n='test_iterqueue'):
    i = [0]

    class C(compat.Consumer):

        def fetch(self, limit=None):
            z = i[0]
            i[0] += 1
            return z
    c = C(self.connection, queue=n, exchange=n, routing_key='rkey')
    self.assertEqual(list(c.iterqueue(limit=10)), list(range(10)))
    c.close()