'Test that if credit requirment status is set to `satisfied`, it
can not not be changed to `failed`'

@ddt.data(*CourseMode.CREDIT_ELIGIBLE_MODES)
def test_set_credit_requirement_status_satisfied_to_failed(self, mode):

    self.add_credit_course()
    self.enroll(self.user, self.course_key, mode)
    self.assertTrue(CourseEnrollment.is_enrolled(self.user, self.course_key))
    self.assertTrue(CourseEnrollment.enrollment_mode_for_user(self.user, self.course_key), (mode, True))
    self._set_credit_course_requirements()
    api.set_credit_requirement_status(self.user, self.course_key, 'grade', 'grade', status='satisfied')
    self.assert_grade_requirement_status('satisfied', 0)
    api.set_credit_requirement_status(self.user, self.course_key, 'grade', 'grade', status='failed')
    self.assert_grade_requirement_status('satisfied', 0)
