'Verifies that the cohort was created properly and the correct response was returned.'

def verify_contains_added_cohort(self, response_dict, cohort_name, assignment_type=CourseCohort.MANUAL, expected_user_partition_id=None, expected_group_id=None):

    created_cohort = get_cohort_by_name(self.course.id, cohort_name)
    self.assertIsNotNone(created_cohort)
    self.assertEqual(response_dict, {'name': cohort_name, 'id': created_cohort.id, 'user_count': 0, 'assignment_type': assignment_type, 'user_partition_id': expected_user_partition_id, 'group_id': expected_group_id})
    self.assertEqual((expected_group_id, expected_user_partition_id), get_group_info_for_cohort(created_cohort))
