'Make sure cohorts.is_course_cohorted() correctly reports if a course is cohorted or not.'

def test_is_course_cohorted(self):

    course = modulestore().get_course(self.toy_course_key)
    self.assertFalse(cohorts.is_course_cohorted(course.id))
    config_course_cohorts(course, is_cohorted=True)
    self.assertTrue(cohorts.is_course_cohorted(course.id))
    fake_key = CourseLocator('a', 'b', 'c')
    self.assertRaises(Http404, (lambda : cohorts.is_course_cohorted(fake_key)))
