'Regenerate a course with cohort configuration, partition and groups,
and a student for each test.'

def setUp(self):

    super(TestCohortPartitionScheme, self).setUp()
    self.course_key = ToyCourseFactory.create().id
    self.course = modulestore().get_course(self.course_key)
    config_course_cohorts(self.course, is_cohorted=True)
    self.groups = [Group(10, 'Group    10'), Group(20, 'Group    20')]
    self.user_partition = UserPartition(0, 'Test    Partition', 'for    testing    purposes', self.groups, scheme=CohortPartitionScheme)
    self.student = UserFactory.create()
