From 27e4b99360f969f8c072a8136ddbf2c655567a5f Mon Sep 17 00:00:00 2001 From: Eugene Dyudyunov Date: Thu, 23 Nov 2023 14:19:57 +0200 Subject: [PATCH] test: update tests according to changes --- lms/djangoapps/courseware/tests/test_about.py | 10 ++++++++-- lms/templates/courseware/course_about.html | 1 - 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lms/djangoapps/courseware/tests/test_about.py b/lms/djangoapps/courseware/tests/test_about.py index d53d620d3e34..bd0c1854ab76 100644 --- a/lms/djangoapps/courseware/tests/test_about.py +++ b/lms/djangoapps/courseware/tests/test_about.py @@ -156,7 +156,10 @@ def test_pre_requisite_course(self): assert resp.status_code == 200 pre_requisite_courses = get_prerequisite_courses_display(course) pre_requisite_course_about_url = reverse('about_course', args=[str(pre_requisite_courses[0]['key'])]) - assert '{}'.format(pre_requisite_course_about_url, pre_requisite_courses[0]['display']) in resp.content.decode(resp.charset).strip('\n') # pylint: disable=line-too-long + assert ( + f'You must successfully complete ' + f'{pre_requisite_courses[0]["display"]} before you begin this course.' + ) in resp.content.decode(resp.charset).strip('\n') @patch.dict(settings.FEATURES, {'ENABLE_PREREQUISITE_COURSES': True}) def test_about_page_unfulfilled_prereqs(self): @@ -190,7 +193,10 @@ def test_about_page_unfulfilled_prereqs(self): assert resp.status_code == 200 pre_requisite_courses = get_prerequisite_courses_display(course) pre_requisite_course_about_url = reverse('about_course', args=[str(pre_requisite_courses[0]['key'])]) - assert '{}'.format(pre_requisite_course_about_url, pre_requisite_courses[0]['display']) in resp.content.decode(resp.charset).strip('\n') # pylint: disable=line-too-long + assert ( + f'You must successfully complete ' + f'{pre_requisite_courses[0]["display"]} before you begin this course.' + ) in resp.content.decode(resp.charset).strip('\n') url = reverse('about_course', args=[str(pre_requisite_course.id)]) resp = self.client.get(url) diff --git a/lms/templates/courseware/course_about.html b/lms/templates/courseware/course_about.html index 2a0108c33444..7afee9c83766 100644 --- a/lms/templates/courseware/course_about.html +++ b/lms/templates/courseware/course_about.html @@ -217,7 +217,6 @@

${course.display_name_with_default}

  • ${_("Prerequisites")}

    - ## Multiple pre-requisite courses are not supported on frontend that's why we are pulling first element

    ${Text(_("You must successfully complete {link_start}{prc_display}{link_end} before you begin this course.")).format( link_start=HTML('').format(prc_target),