'Ensure fields with document choices validate given subclass of choice.'

def test_choices_validation_documents_inheritance(self):

    class Comments(EmbeddedDocument, ):
        meta = {'abstract': True}
        author = StringField()
        message = StringField()
    class UserComments(Comments, ):
        pass
    class BlogPost(Document, ):
        comments = ListField(GenericEmbeddedDocumentField(choices=(Comments,)))
    BlogPost(comments=[UserComments(author='user2', message='message2')]).save()
