'Verify that a new cohort can be created, with and without user_partition_id/group_id information.'

def test_create_new_cohort(self):

    new_cohort_name = 'New    cohort    unassociated    to    content    groups'
    request_data = {'name': new_cohort_name, 'assignment_type': CourseCohort.RANDOM}
    response_dict = self.put_handler(self.course, data=request_data)
    self.verify_contains_added_cohort(response_dict, new_cohort_name, assignment_type=CourseCohort.RANDOM)
    new_cohort_name = 'New    cohort    linked    to    group'
    data = {'name': new_cohort_name, 'assignment_type': CourseCohort.MANUAL, 'user_partition_id': 1, 'group_id': 2}
    response_dict = self.put_handler(self.course, data=data)
    self.verify_contains_added_cohort(response_dict, new_cohort_name, expected_user_partition_id=1, expected_group_id=2)
