BOM-618 Decode content we get from test requests.
This commit is contained in:
@@ -215,7 +215,7 @@ class ReactivationEmailTests(EmailTestMixin, CacheIsolationTestCase):
|
||||
Send the reactivation email to the specified user,
|
||||
and return the response as json data.
|
||||
"""
|
||||
return json.loads(send_reactivation_email_for_user(user).content)
|
||||
return json.loads(send_reactivation_email_for_user(user).content.decode('utf-8'))
|
||||
|
||||
def assertReactivateEmailSent(self, email_user):
|
||||
"""
|
||||
@@ -480,7 +480,7 @@ class EmailChangeConfirmationTests(EmailTestMixin, EmailTemplateTagMixin, CacheI
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEquals(
|
||||
mock_render_to_response(expected_template, expected_context).content,
|
||||
response.content
|
||||
response.content.decode('utf-8')
|
||||
)
|
||||
|
||||
def assertChangeEmailSent(self, test_body_type):
|
||||
|
||||
@@ -935,7 +935,7 @@ class IntegrationTest(testutil.TestCase, test.TestCase, HelperMixin):
|
||||
strategy.request.POST['password'] = 'bad_' + password if success is False else password
|
||||
|
||||
self.assert_pipeline_running(strategy.request)
|
||||
payload = json.loads(login_user(strategy.request).content)
|
||||
payload = json.loads(login_user(strategy.request).content.decode('utf-8'))
|
||||
|
||||
if success is None:
|
||||
# Request malformed -- just one of email/password given.
|
||||
|
||||
Reference in New Issue
Block a user