From 09843b993c6008cfe9ef80cc55e69652816e92c8 Mon Sep 17 00:00:00 2001 From: Ayub khan Date: Thu, 3 Oct 2019 15:54:04 +0500 Subject: [PATCH] BOM-893 python3 compatibility: regex needs bytes type strings to check bytes type response --- .../course_experience/tests/views/test_course_outline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openedx/features/course_experience/tests/views/test_course_outline.py b/openedx/features/course_experience/tests/views/test_course_outline.py index 014934de3a..4b86e85ea0 100644 --- a/openedx/features/course_experience/tests/views/test_course_outline.py +++ b/openedx/features/course_experience/tests/views/test_course_outline.py @@ -550,7 +550,7 @@ class TestCourseOutlineResumeCourse(SharedModuleStoreTestCase, CompletionWaffleT sequential2 = chapter.children[1] response_content = self.client.get(course_home_url(course)).content - stripped_response = text_type(re.sub("\\s+", "", response_content), "utf-8") + stripped_response = text_type(re.sub(b"\\s+", b"", response_content), "utf-8") self.assertTrue(get_sequential_button(text_type(sequential1.location), False) in stripped_response) self.assertTrue(get_sequential_button(text_type(sequential2.location), True) in stripped_response)