'Tests that a student will not be able to enroll through this view if
they are already enrolled in the course'

def test_cannot_enroll_if_already_enrolled(self):

    CourseEnrollment.enroll(self.user, self.course.id)
    self.assertTrue(CourseEnrollment.is_enrolled(self.user, self.course.id))
    response = self._enroll_through_view(self.course)
    self.assertEqual(response.status_code, 400)
