'Ensure that abstract documents can set inheritance rules and that
_cls will not be used.'

def test_allow_inheritance_abstract_document(self):

    class FinalDocument(Document, ):
        meta = {'abstract': True, 'allow_inheritance': False}
    class Animal(FinalDocument, ):
        name = StringField()
    with self.assertRaises(ValueError):
        class Mammal(Animal, ):
            pass
    doc = Animal(name='dog')
    self.assertFalse(('_cls' in doc.to_mongo()))
