'Ensure embedded documents respect inheritance.'

def test_allow_inheritance_embedded_document(self):

    class Comment(EmbeddedDocument, ):
        content = StringField()
    with self.assertRaises(ValueError):
        class SpecialComment(Comment, ):
            pass
    doc = Comment(content='test')
    self.assertFalse(('_cls' in doc.to_mongo()))
    class Comment(EmbeddedDocument, ):
        content = StringField()
        meta = {'allow_inheritance': True}
    doc = Comment(content='test')
    self.assertTrue(('_cls' in doc.to_mongo()))
