'Ensure that embedded documents may be validated.'

def test_embedded_document_validation(self):

    class Comment(EmbeddedDocument, ):
        date = DateTimeField()
        content = StringField(required=True)
    comment = Comment()
    self.assertRaises(ValidationError, comment.validate)
    comment.content = 'test'
    comment.validate()
    comment.date = 4
    self.assertRaises(ValidationError, comment.validate)
    comment.date = datetime.now()
    comment.validate()
    self.assertEqual(comment._instance, None)
