'Assert that the student\'s enrollment has the correct mode.'

def assert_enrollment(self, mode):

    enrollment = CourseEnrollment.get_enrollment(self.student, self.course.id)
    self.assertEqual(enrollment.mode, mode)
