From 76bce7954ac58027b706d97ea4277f50a2242cd6 Mon Sep 17 00:00:00 2001 From: Andy Raines Date: Mon, 5 Oct 2015 14:14:56 +0100 Subject: [PATCH] Fixes #430: MD5 hashing should be done to the real body, not an escaped one --- moto/sqs/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moto/sqs/models.py b/moto/sqs/models.py index bc0a5a4c6..efb75dd9c 100644 --- a/moto/sqs/models.py +++ b/moto/sqs/models.py @@ -34,7 +34,7 @@ class Message(object): @property def md5(self): body_md5 = hashlib.md5() - body_md5.update(self.body.encode('utf-8')) + body_md5.update(self._body.encode('utf-8')) return body_md5.hexdigest() @property