'Ensure that QuerySets may be ordered.'

def test_order_by(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()
    names = [p.name for p in self.Person.objects.order_by('-age')]
    self.assertEqual(names, ['User    B', 'User    C', 'User    A'])
    names = [p.name for p in self.Person.objects.order_by('+age')]
    self.assertEqual(names, ['User    A', 'User    C', 'User    B'])
    names = [p.name for p in self.Person.objects.order_by('age')]
    self.assertEqual(names, ['User    A', 'User    C', 'User    B'])
    ages = [p.age for p in self.Person.objects.order_by('-name')]
    self.assertEqual(ages, [30, 40, 20])
