'Test that it is possible to remove the user_partition_id/group_id linking of an existing cohort.'

def test_update_cohort_remove_group_id(self):

    self._create_cohorts()
    link_cohort_to_partition_group(self.cohort1, 5, 0)
    self.assertEqual((0, 5), get_group_info_for_cohort(self.cohort1))
    data = {'name': self.cohort1.name, 'assignment_type': CourseCohort.RANDOM, 'group_id': None}
    response_dict = self.put_handler(self.course, self.cohort1, data=data)
    self.assertEqual((None, None), get_group_info_for_cohort(self.cohort1))
    self.assertIsNone(response_dict.get('group_id'))
    self.assertIsNone(response_dict.get('user_partition_id'))
