Commits

c7protal  committed 522499c

Converted three errors to failures: http://bitbucket.org/fiji/django-3k/issue/95

from FAILED (failures=353, errors=127)
to FAILED (failures=356, errors=124)

  • Participants
  • Parent commits 3c5d32b

Comments (0)

Files changed (1)

File django/contrib/messages/storage/cookie.py

 from django.http import CompatCookie
 from django.utils import simplejson as json
 from django.utils.hashcompat import sha_hmac
-
+from django.utils.py3 import to_utf8_bytes
 
 class MessageEncoder(json.JSONEncoder):
     """
         returned), and add the not_finished sentinel value to indicate as much.
         """
         unstored_messages = []
-        encoded_data = self._encode(messages)
+        encoded_data = self._encode(to_utf8_bytes(messages))
         if self.max_cookie_size:
             # data is going to be stored eventually by CompatCookie, which
             # adds it's own overhead, which we must account for.