'Generate TOC for a course with a single chapter/sequence which contains proctored exam'

@ddt.data((CourseMode.DEFAULT_MODE_SLUG, False, None, None), (CourseMode.DEFAULT_MODE_SLUG, True, 'eligible', {'status': 'eligible', 'short_description': 'Ungraded    Practice    Exam', 'suggested_icon': '', 'in_completed_state': False}), (CourseMode.DEFAULT_MODE_SLUG, True, 'submitted', {'status': 'submitted', 'short_description': 'Practice    Exam    Completed', 'suggested_icon': 'fa-check', 'in_completed_state': True}), (CourseMode.DEFAULT_MODE_SLUG, True, 'error', {'status': 'error', 'short_description': 'Practice    Exam    Failed', 'suggested_icon': 'fa-exclamation-triangle', 'in_completed_state': True}), (CourseMode.VERIFIED, False, None, {'status': 'eligible', 'short_description': 'Proctored    Option    Available', 'suggested_icon': 'fa-pencil-square-o', 'in_completed_state': False}), (CourseMode.VERIFIED, False, 'declined', {'status': 'declined', 'short_description': 'Taking    As    Open    Exam', 'suggested_icon': 'fa-pencil-square-o', 'in_completed_state': False}), (CourseMode.VERIFIED, False, 'submitted', {'status': 'submitted', 'short_description': 'Pending    Session    Review', 'suggested_icon': 'fa-spinner    fa-spin', 'in_completed_state': True}), (CourseMode.VERIFIED, False, 'verified', {'status': 'verified', 'short_description': 'Passed    Proctoring', 'suggested_icon': 'fa-check', 'in_completed_state': True}), (CourseMode.VERIFIED, False, 'rejected', {'status': 'rejected', 'short_description': 'Failed    Proctoring', 'suggested_icon': 'fa-exclamation-triangle', 'in_completed_state': True}), (CourseMode.VERIFIED, False, 'error', {'status': 'error', 'short_description': 'Failed    Proctoring', 'suggested_icon': 'fa-exclamation-triangle', 'in_completed_state': True}))
@ddt.unpack
def test_proctored_exam_toc(self, enrollment_mode, is_practice_exam, attempt_status, expected):

    self._setup_test_data(enrollment_mode, is_practice_exam, attempt_status)
    actual = render.toc_for_course(self.request.user, self.request, self.toy_course, self.chapter, 'Toy_Videos', self.field_data_cache)
    section_actual = self._find_section(actual['chapters'], 'Overview', 'Toy_Videos')
    if expected:
        self.assertIn(expected, [section_actual['proctoring']])
    else:
        self.assertNotIn('proctoring', section_actual)
    self.assertIsNone(actual['previous_of_active_section'])
    self.assertEquals(actual['next_of_active_section']['url_name'], u'Welcome')
