python 3 fixes
test fixes changes made as suggested updated the variable name
This commit is contained in:
@@ -1311,7 +1311,8 @@ def append_data_to_webob_response(response, data):
|
||||
|
||||
"""
|
||||
if getattr(response, 'content_type', None) == 'application/json':
|
||||
response_data = json.loads(response.body)
|
||||
json_input = response.body.decode('utf-8') if isinstance(response.body, bytes) else response.body
|
||||
response_data = json.loads(json_input)
|
||||
response_data.update(data)
|
||||
response.body = json.dumps(response_data)
|
||||
response.body = json.dumps(response_data).encode('utf-8')
|
||||
return response
|
||||
|
||||
@@ -552,7 +552,7 @@ class EntranceExamTestCases(LoginEnrollmentTestCase, ModuleStoreTestCase, Milest
|
||||
'problem_check',
|
||||
)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertIn('entrance_exam_passed', response.content)
|
||||
self.assertIn('entrance_exam_passed', response.content.decode('utf-8'))
|
||||
|
||||
def _assert_chapter_loaded(self, course, chapter):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user