Merge pull request #21539 from edx/BOM-125

BOM-125
This commit is contained in:
Aarif
2019-09-05 12:06:35 +05:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -75,7 +75,7 @@ class TestUpdates(MobileAPITestCase, MobileAuthTestMixin, MobileCourseAccessTest
response = self.api_response(api_version=api_version)
# verify static URLs are replaced in the content returned by the API
self.assertNotIn("\"/static/", response.content)
self.assertNotIn("\"/static/", response.content.decode('utf-8'))
# verify static URLs remain in the underlying content
underlying_updates = modulestore().get_item(updates_usage_key)

View File

@@ -434,7 +434,7 @@ def get_course_update_items(course_updates, provided_index=0):
content = html_parsed[0].tail
else:
content = html_parsed[0].tail if html_parsed[0].tail is not None else ""
content += "\n".join([html.tostring(ele) for ele in html_parsed[1:]])
content += "\n".join([html.tostring(ele).decode('utf-8') for ele in html_parsed[1:]])
return content
if course_updates and getattr(course_updates, "items", None):