'Ensure that ordering still works after filtering.'

def test_order_then_filter(self):

    class Number(Document, ):
        n = IntField()
    Number.drop_collection()
    n2 = Number.objects.create(n=2)
    n1 = Number.objects.create(n=1)
    self.assertEqual(list(Number.objects), [n2, n1])
    self.assertEqual(list(Number.objects.order_by('n')), [n1, n2])
    self.assertEqual(list(Number.objects.order_by('n').filter()), [n1, n2])
    Number.drop_collection()
