Skip to content
Snippets Groups Projects
Commit 22c963a9 authored by Tim McCormack's avatar Tim McCormack
Browse files

Perform byte/string conversions where Django is no longer tolerant

parent 8d951ae8
No related branches found
No related tags found
No related merge requests found
......@@ -67,8 +67,12 @@ class ContainerPageTestCase(StudioPageTestCase, LibraryTestCase):
u'<a href="/course/{course}{subsection_parameters}">Lesson 1</a>'
).format(
course=re.escape(six.text_type(self.course.id)),
section_parameters=re.escape(u'?show={}'.format(http.urlquote(self.chapter.location))),
subsection_parameters=re.escape(u'?show={}'.format(http.urlquote(self.sequential.location))),
section_parameters=re.escape(u'?show={}'.format(http.urlquote(
str(self.chapter.location).encode()
))),
subsection_parameters=re.escape(u'?show={}'.format(http.urlquote(
str(self.sequential.location).encode()
))),
),
)
......@@ -93,7 +97,9 @@ class ContainerPageTestCase(StudioPageTestCase, LibraryTestCase):
).format(
course=re.escape(six.text_type(self.course.id)),
unit_parameters=re.escape(str(self.vertical.location)),
subsection_parameters=re.escape(u'?show={}'.format(http.urlquote(self.sequential.location))),
subsection_parameters=re.escape(u'?show={}'.format(http.urlquote(
str(self.sequential.location).encode()
))),
),
)
......
......@@ -27,7 +27,7 @@ class HelpersTestCase(CourseTestCase):
display_name="Week 1")
self.assertEqual(
xblock_studio_url(chapter),
u'{}?show={}'.format(course_url, http.urlquote(chapter.location))
u'{}?show={}'.format(course_url, http.urlquote(str(chapter.location).encode()))
)
# Verify sequential URL
......@@ -35,7 +35,7 @@ class HelpersTestCase(CourseTestCase):
display_name="Lesson 1")
self.assertEqual(
xblock_studio_url(sequential),
u'{}?show={}'.format(course_url, http.urlquote(sequential.location))
u'{}?show={}'.format(course_url, http.urlquote(str(sequential.location).encode()))
)
# Verify unit URL
......
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