'Sets requirements for the credit course.
Returns:
dict: Course requirements'

def _set_credit_course_requirements(self):

    requirements = [{'namespace': 'grade', 'name': 'grade', 'display_name': 'Grade', 'criteria': {'min_grade': 0.8}}, {'namespace': 'grade', 'name': 'other_grade', 'display_name': 'Assessment    1', 'criteria': {}}]
    api.set_credit_requirements(self.course_key, requirements)
    course_requirements = api.get_credit_requirements(self.course_key)
    self.assertEqual(len(course_requirements), 2)
