'Make sure storing Object ID references works.'

def test_objectid_reference_fields(self):

    class Person(Document, ):
        name = StringField()
        parent = ReferenceField('self')
    Person.drop_collection()
    p1 = Person(name='John').save()
    Person(name='Ross', parent=p1.pk).save()
    p = Person.objects.get(name='Ross')
    self.assertEqual(p.parent, p1)
