Skip to content
Snippets Groups Projects
Commit ff98318a authored by Awais Qureshi's avatar Awais Qureshi
Browse files

BOM-416

Fixing python3
parent d1de513c
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ from __future__ import absolute_import
import json
import six
from django.contrib.auth.models import AnonymousUser
from django.core.exceptions import PermissionDenied
from django.http import Http404
......@@ -61,7 +62,7 @@ class NotificationPrefViewTest(UrlResetMixin, TestCase):
# now coerce username to utf-8 encoded str, since we test with non-ascii unicdoe above and
# the unittest framework has hard time coercing to unicode.
# decrypt also can't take a unicode input, so coerce its input to str
self.assertEqual(str(user.username.encode('utf-8')), UsernameCipher().decrypt(str(pref.value)))
self.assertEqual(six.binary_type(user.username.encode('utf-8')), UsernameCipher().decrypt(str(pref.value)))
def assertNotPrefExists(self, user):
"""Ensure that the user does not have a persisted preference"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment