'Ensure that the embedded documents can be updated using the positional
operator.'

def test_update_using_positional_operator_embedded_document(self):

    class Vote(EmbeddedDocument, ):
        score = IntField()
    class Comment(EmbeddedDocument, ):
        by = StringField()
        votes = EmbeddedDocumentField(Vote)
    class BlogPost(Document, ):
        title = StringField()
        comments = ListField(EmbeddedDocumentField(Comment))
    BlogPost.drop_collection()
    c1 = Comment(by='joe', votes=Vote(score=3))
    c2 = Comment(by='jane', votes=Vote(score=7))
    BlogPost(title='ABC', comments=[c1, c2]).save()
    BlogPost.objects(comments__by='joe').update(set__comments__S__votes=Vote(score=4))
    post = BlogPost.objects.first()
    self.assertEqual(post.comments[0].by, 'joe')
    self.assertEqual(post.comments[0].votes.score, 4)
