'Verifies gated content from the student view rendering of a sequence
this is labeled as a proctored exam'

@ddt.data((CourseMode.DEFAULT_MODE_SLUG, True, None, 'Try    a    proctored    exam', True), (CourseMode.DEFAULT_MODE_SLUG, True, 'submitted', 'You    have    submitted    this    practice    proctored    exam', False), (CourseMode.DEFAULT_MODE_SLUG, True, 'error', 'There    was    a    problem    with    your    practice    proctoring    session', True), (CourseMode.VERIFIED, False, None, 'This    exam    is    proctored', False), (CourseMode.VERIFIED, False, 'submitted', 'You    have    submitted    this    proctored    exam    for    review', True), (CourseMode.VERIFIED, False, 'verified', 'Your    proctoring    session    was    reviewed    and    passed    all    requirements', False), (CourseMode.VERIFIED, False, 'rejected', 'Your    proctoring    session    was    reviewed    and    did    not    pass    requirements', True), (CourseMode.VERIFIED, False, 'error', 'A    technical    error    has    occurred    with    your    proctored    exam', False))
@ddt.unpack
def test_render_proctored_exam(self, enrollment_mode, is_practice_exam, attempt_status, expected, with_credit_context):

    usage_key = self._setup_test_data(enrollment_mode, is_practice_exam, attempt_status)
    if with_credit_context:
        credit_course = CreditCourse(course_key=self.course_key, enabled=True)
        credit_course.save()
        set_credit_requirements(self.course_key, [{'namespace': 'reverification', 'name': 'reverification-1', 'display_name': 'ICRV1', 'criteria': {}}, {'namespace': 'proctored-exam', 'name': 'Exam1', 'display_name': 'A    Proctored    Exam', 'criteria': {}}])
        set_credit_requirement_status(self.request.user, self.course_key, 'reverification', 'ICRV1')
    module = render.get_module(self.request.user, self.request, usage_key, self.field_data_cache, wrap_xmodule_display=True)
    content = module.render(STUDENT_VIEW).content
    self.assertIn(expected, content)
