'Field instances have a `__lt__` comparison function to define an
ordering based on their creation. Prior to #17851 this ordering
comparison relied on the now unsupported `__cmp__` and was assuming
compared objects were both Field instances raising `AttributeError`
when it should have returned `NotImplemented`.'

def test_field_ordering(self):

    f1 = Field()
    f2 = Field(auto_created=True)
    f3 = Field()
    self.assertTrue((f2 < f1))
    self.assertTrue((f3 > f1))
    self.assertFalse((f1 == None))
    self.assertFalse((f2 in (None, 1, u'')))
