'Get enrollment data and assert response with expected modes.'

def assert_enrollment_modes(self, expected_modes, include_expired):

    result_course = data.get_course_enrollment_info(unicode(self.course.id), include_expired=include_expired)
    result_slugs = [mode['slug'] for mode in result_course['course_modes']]
    for course_mode in expected_modes:
        self.assertIn(course_mode, result_slugs)
    if (not include_expired):
        self.assertNotIn('verified', result_slugs)
