'Verify the user\'s credit requirement status is as expected after simulating a grading calculation.'

def assert_requirement_status(self, grade, due_date, expected_status):

    course_grade = MagicMock()
    course_grade.percent = grade
    listen_for_grade_calculation(None, self.user, course_grade, self.course.id, due_date)
    req_status = get_credit_requirement_status(self.course.id, self.request.user.username, 'grade', 'grade')
    self.assertEqual(req_status[0]['status'], expected_status)
    if (expected_status == 'satisfied'):
        expected_reason = {'final_grade': grade}
        self.assertEqual(req_status[0]['reason'], expected_reason)
