'Ensure that subclasses of embedded documents may be provided
to EmbeddedDocumentFields of the superclass\' type.'

def test_embedded_document_inheritance(self):

    class User(EmbeddedDocument, ):
        name = StringField()
        meta = {'allow_inheritance': True}
    class PowerUser(User, ):
        power = IntField()
    class BlogPost(Document, ):
        content = StringField()
        author = EmbeddedDocumentField(User)
    BlogPost.drop_collection()
    post = BlogPost(content='What    I    did    today...')
    post.author = PowerUser(name='Test    User', power=47)
    post.save()
    self.assertEqual(47, BlogPost.objects.first().author.power)
