'Ensure that an order_by query chains properly and allows .only()'

def test_order_by_chaining(self):

    self.Person(name='User    B', age=40).save()
    self.Person(name='User    A', age=20).save()
    self.Person(name='User    C', age=30).save()
    only_age = self.Person.objects.order_by('-age').only('age')
    names = [p.name for p in only_age]
    ages = [p.age for p in only_age]
    self.assertEqual(names, [None, None, None])
    self.assertEqual(ages, [40, 30, 20])
    qs = self.Person.objects.all().order_by('-age')
    qs = qs.limit(10)
    ages = [p.age for p in qs]
    self.assertEqual(ages, [40, 30, 20])
    qs = self.Person.objects.all().limit(10)
    qs = qs.order_by('-age')
    ages = [p.age for p in qs]
    self.assertEqual(ages, [40, 30, 20])
    qs = self.Person.objects.all().skip(0)
    qs = qs.order_by('-age')
    ages = [p.age for p in qs]
    self.assertEqual(ages, [40, 30, 20])
