'With the right API key, create a new enrollment with a mode set other than the default.'

def test_create_enrollment_with_mode(self):

    CourseModeFactory.create(course_id=self.course.id, mode_slug='professional', mode_display_name='professional')
    self.assert_enrollment_status(as_server=True, mode='professional')
    self.assertTrue(CourseEnrollment.is_enrolled(self.user, self.course.id))
    (course_mode, is_active) = CourseEnrollment.enrollment_mode_for_user(self.user, self.course.id)
    self.assertTrue(is_active)
    self.assertEqual(course_mode, 'professional')
