'Test that it is possible to change the user_partition_id/group_id of an existing cohort to a
different group_id.'

def test_change_cohort_group_id(self):

    self._create_cohorts()
    self.assertEqual((None, None), get_group_info_for_cohort(self.cohort4))
    data = {'name': self.cohort4.name, 'assignment_type': CourseCohort.RANDOM, 'group_id': 2, 'user_partition_id': 3}
    self.put_handler(self.course, self.cohort4, data=data)
    self.assertEqual((2, 3), get_group_info_for_cohort(self.cohort4))
    data = {'name': self.cohort4.name, 'assignment_type': CourseCohort.RANDOM, 'group_id': 1, 'user_partition_id': 3}
    self.put_handler(self.course, self.cohort4, data=data)
    self.assertEqual((1, 3), get_group_info_for_cohort(self.cohort4))
