'Verify that message appears on progress page, if learner is enrolled
in audit mode.'

@patch('lms.djangoapps.grades.new.course_grade.CourseGrade.summary', PropertyMock(return_value={'grade': 'Pass', 'percent': 0.75, 'section_breakdown': [], 'grade_breakdown': {}}))
def test_message_for_audit_mode(self):

    user = UserFactory.create()
    self.assertTrue(self.client.login(username=user.username, password='test'))
    CourseEnrollmentFactory(user=user, course_id=self.course.id, mode=CourseMode.AUDIT)
    response = self._get_progress_page()
    self.assertContains(response, u'You    are    enrolled    in    the    audit    track    for    this    course.    The    audit    track    does    not    include    a    certificate.')
