'Verify that the default cohort is not created and included in the response until students are assigned to it.'

def test_default_cohort(self):

    self.verify_lists_expected_cohorts([])
    config_course_cohorts(self.course, is_cohorted=True)
    self.verify_lists_expected_cohorts([])
    users = [UserFactory() for _ in range(3)]
    self._enroll_users(users, self.course.id)
    for user in users:
        get_cohort(user, self.course.id)
    default_cohort = get_cohort_by_name(self.course.id, DEFAULT_COHORT_NAME)
    actual_cohorts = self.get_handler(self.course)
    self.verify_lists_expected_cohorts([CohortHandlerTestCase.create_expected_cohort(default_cohort, len(users), CourseCohort.RANDOM)], actual_cohorts)
    config_course_cohorts_legacy(self.course, cohorted=True, auto_cohort_groups=['AutoGroup'])
    with self.assertRaises(CourseUserGroup.DoesNotExist):
        get_cohort_by_name(self.course.id, 'AutoGroup')
