'Make sure cohorts.get_cohort_by_id() properly finds a cohort by id for a given
course.'

def test_get_cohort_by_id(self):

    course = modulestore().get_course(self.toy_course_key)
    cohort = CohortFactory(course_id=course.id, name='MyCohort')
    self.assertEqual(cohorts.get_cohort_by_id(course.id, cohort.id), cohort)
    cohort.delete()
    self.assertRaises(CourseUserGroup.DoesNotExist, (lambda : cohorts.get_cohort_by_id(course.id, cohort.id)))
