def test_review_vertical_url(self): """ Verify that the URL returned from the Review xBlock is a valid and correct URL for the vertical the learner has seen. """ self.enroll_student(self.STUDENTS[0]['email'], self.STUDENTS[0]['password'], self.course_actual) self.enroll_student(self.STUDENTS[0]['email'], self.STUDENTS[0]['password'], self.course_review) # Loading problems so the learner has problems and thus a vertical in the CSM self.client.get(reverse( 'courseware_section', kwargs={ 'course_id': self.course_actual.id, 'chapter': self.chapter_actual.location.name, 'section': self.section1_actual.location.name, } )) user = User.objects.get(email=self.STUDENTS[0]['email']) crum.set_current_user(user) result_url = get_review_ids.get_vertical(self.course_actual.id) expected_url = self.URL_BEGINNING + 'vertical+block@New_Unit_1' self.assertEqual(result_url, expected_url)
def test_review_vertical_url(self): """ Verify that the URL returned from the Review xBlock is a valid and correct URL for the vertical the learner has seen. """ self.enroll_student(self.STUDENTS[0]['email'], self.STUDENTS[0]['password'], self.course_actual) self.enroll_student(self.STUDENTS[0]['email'], self.STUDENTS[0]['password'], self.course_review) # Loading problems so the learner has problems and thus a vertical in the CSM self.client.get( reverse('courseware_section', kwargs={ 'course_id': self.course_actual.id, 'chapter': self.chapter_actual.location.name, 'section': self.section1_actual.location.name, })) user = User.objects.get(email=self.STUDENTS[0]['email']) crum.set_current_user(user) result_url = get_review_ids.get_vertical(self.course_actual.id) expected_url = self.URL_BEGINNING + 'vertical+block@New_Unit_1' self.assertEqual(result_url, expected_url)