'Tests that calling len on a queyset during iteration doesn\'t
stop paging.'

def test_len_during_iteration(self):

    class Data(Document, ):
        pass
    for i in range(300):
        Data().save()
    records = Data.objects.limit(250)
    len(records)
    for (i, r) in enumerate(records):
        if (i == 58):
            len(records)
    self.assertEqual(i, 249)
    records = Data.objects.limit(250)
    for (i, r) in enumerate(records):
        if (i == 58):
            len(records)
    self.assertEqual(i, 249)
