BOM-618 Decode content we get from test requests.

This commit is contained in:
Feanil Patel
2019-09-18 17:25:58 -04:00
parent dab38a5ef3
commit f259a911c7
3 changed files with 13 additions and 13 deletions

View File

@@ -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):

View File

@@ -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.